sonny
New Member
Posts: 4
|
Post by sonny on Feb 11, 2019 0:16:56 GMT
hey all, looking for some help again, I am trying to make a program that updates my Game Loader Folders with newer files using cmd.exe this command works correctly run "cmd.exe /K xcopy /Y/K " +chr$( 34) + SourceF$ +"Game Loader All RH.exe" +chr$( 34) +chr$(32) +chr$( 34) + fullPath$ +chr$( 34) but this this command without the /K so the cmd window closes automatically run "cmd.exe xcopy /Y/K " +chr$( 34) + SourceF$ +"Game Loader All RH.exe" +chr$( 34) +chr$(32) +chr$( 34) + fullPath$ +chr$( 34) gives me an error in the SourceF$ variable it maybe a cmd problem but I was wondering if any one would have an idea why ? thanks for any help you can give
|
|
|
Post by Rod on Feb 11, 2019 8:00:51 GMT
From my reading you need to replace the /K with /C after cmd.exe Then the command will run and terminate.
Best get the string working by directly keying into the command prompt. Then build it with "" in Just BASIC printing the string to the mainwin to see how it looks to the command prompt.
|
|
sonny
New Member
Posts: 4
|
Post by sonny on Feb 11, 2019 20:35:10 GMT
hey there, Yes I have the string printing before I move any files anywhere (for safety), the string was printing correctly just not executing correctly. The /C works perfectly and does exactly what it should. many thanks for your help
|
|
|
Post by Rod on Feb 12, 2019 7:22:00 GMT
If folks are exploring the command prompt then key help or help command at the cursor to get all the options for each command. This includes cmd,exe itself.
|
|