Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FORFILES with spaces in the path

Tags:

batch-file

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"

like image 641
Raffaeu Avatar asked Mar 31 '14 14:03

Raffaeu


1 Answers

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"
like image 139
foxidrive Avatar answered Sep 28 '22 02:09

foxidrive