batch xcopy invalid parameters -
What am I trying to do to copy files from specific locations? Problem Xcopy tells me that I have invalid parameters I due to this fact I have not created a batch program before, I wanted to ask if it is possible to do this?
set _pfadTarget = path \ test set_pfadSourceDesk = c: \ users \. \ Users \ xxxx \ Documents set _propertyDOC = \ * Dock REM ------- all DOC files -------- set _FullSourcePath =% _pfadSourceDesk %% _ propertyDOC% set: xxxx \ Desktop _pfadSourceDocu = c Set _FullDestPath =% _pfadTarget %% _ propertyDOC% xcopy% _FullSourcePath %% _FullDestPath% / S / y _FullSourcePath =% _pfadSourceDocu set %% _ propertyDOC% xcopy% _FullSourcePath %% _FullDestPath% / S / Y exit
It breaks around empty space, and it seems that all your variables are affected.
set spaces _FullSourcePath =% _pfSourceDesk %% _ propertyDOC%
This method works well for the variable name, and around double quotes Allow long file and path elements in variable content.
The quotation given below in the top line is not actually included in the variable when used in such a way, the quotation marks are used to protect the contents again in the XP command.
set "_FullSourcePath =% _ pfadSourceDesk %% _ propertyDOC%" Xcopy "% _pfadSourceDesk %% _ propertyDOC%" "d: \ my backup \ 2014 04 28 \" / s / h / E / k / f / c
Comments
Post a Comment