Issue with quoting runret command

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zBernie
Posts: 179
Joined: 08 Dec 2016 17:20

Issue with quoting runret command

Post by zBernie »

I've tried numerous quoting permutations of the runret command below, and none have worked. Can someone please tell me how to quote this?

text runret("""cmd /c C:\Windows\System32\Robocopy.exe"" ""C:\Users\bernie\AppData\Roaming\XYplorer Backup"" ""C:\Users\bernie\Desktop\XYplorer""" /MIR);


-Thanks

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Issue with quoting runret command

Post by highend »

/MIR is NOT inside the command block and you don't need cmd to invoke a standalone command line tool like robocopy

Easiest way:

Code: Select all

text runret("""robocopy.exe"" ""C:\Users\bernie\AppData\Roaming\XYplorer Backup"" ""C:\Users\bernie\Desktop\XYplorer"" /MIR");
One of my scripts helped you out? Please donate via Paypal

zBernie
Posts: 179
Joined: 08 Dec 2016 17:20

Re: Issue with quoting runret command

Post by zBernie »

highend wrote:/MIR is NOT inside the command block and you don't need cmd to invoke a cmd tool like robocopy

Easiest way:

Code: Select all

text runret("""robocopy.exe"" ""C:\Users\bernie\AppData\Roaming\XYplorer Backup"" ""C:\Users\bernie\Desktop\XYplorer"" /MIR");
Thank you. That's a lot of quotes! :)

Post Reply