Reputation: 6993
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: 5810
Reputation: 41267
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: 8215
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