After talking with Keisuke at the summit it was found that: the code I was using was NOT correctly escaping the file or folder path. this was due to a failed copy/paste of some of Keisuke's code (LEP_Escape from one of his demos).
Replacing the broken code with the correct code resolved the issue. Thanks for everyone who tried to help and special thanks to Keisuke! Chip > some testing reveals that... > > XCOPY returns an "invalid path error" if the source path ends with a > folder separator > XCOPY begins an "is this a file or a path" dialog if the destination > path does NOT end with a folder separator > > so here is a small example > >> $command:="cmd.exe /C xcopy " >> >> $src:=System folder(Desktop)+"src"+Folder separator >> CREATE FOLDER($src;*) >> >> C_BLOB($VOID) >> BLOB TO DOCUMENT($src+Generate UUID;$VOID) >> BLOB TO DOCUMENT($src+Generate UUID;$VOID) >> BLOB TO DOCUMENT($src+Generate UUID;$VOID) >> >> $src:=System folder(Desktop)+"src" //must remove folder separator >> $dst:=System folder(Desktop)+"dst"+Folder separator // must add >> folder separator >> >> $command:=$command+$src+" "+$dst >> >> //SET ENVIRONMENT >> VARIABLE("_4D_OPTION_BLOCKING_EXTERNAL_PROCESS";"false") >> //SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true") >> >> C_TEXT($in;$out;$err) >> LAUNCH EXTERNAL PROCESS($command;$in;$out;$err) > > if you are not sure how paths should be escaped > take a look at the "PATH_Escape" method in this component: > > https://github.com/miyako/4d-component-sublaunch > > notice the rules to escape string (LEP_Escape) and path (PATH_Escape) > are slightly different. > > P.S. > > COPY DOCUMENT was updated in v14 to support the copying of folders. > http://doc.4d.com/4Dv14/4D/14.4/COPY-DOCUMENT.301-2511853.en.html > > > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** ------------ Hell is other people Jean-Paul Sartre ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************