Reputation: 6973
I am trying to run this command in dos
FORFILES with params /P C:\Builds\ /M *.chm /S /C "cmd /c copy @file C:\My Brand\"
It bombs because there is a space in the destination folder path. How can I pass the source and destination path delimited by ""? I tried by adding an additional double quote and I get "command not recognized"
Upvotes: 6
Views: 5796
Reputation: 41224
0x22
is a representation of a double quote (hex encoded).
FORFILES /P C:\Builds\ /M *.chm /S /C "cmd /c copy @file 0x22C:\My Brand\0x22"
Upvotes: 7
Reputation: 8185
Escape the quotes surrounding the destination path with a backslash:
FORFILES /P C:\Builds\ /M *.chm /S /C "cmd /c copy @file \"C:\My Brand\\""
Upvotes: 5