copy - Batch File XCopy Command -


I have a batch file that passes through the contents of the text file and creates a copy of a specific file Xcopy is the command.

Here's the snippet.

 For  /f %% a in (FilesToCopy.txt) do (xcopy .. \. \ Common \ %% a normal \ %% a / I / d / c / v / S / y / f xcopy general \ %% a .. \. \ General \ %% a / i / d / c / v / s / y / f)  

%% Prices such as images are \ image1.jpg images \ image2.jpg

so when xcopy is executed it will look like

  xcopy. \. When executing \ General \ Images \ image1.jpg common \ Images \ image1.jpg / i / d / c / v / s / y  

, then this message will indicate

  General \ Images \ image1.png Specify a file name or directory name on target (F = file, D = directory)?  

It seems that the / i command does not work or I am missing something to suppress the above message.

OK, you have left the second statement with the help of / I :

 / I if the destination is not present and copies more than one file, then assuming that the destination should be a directory. 

You are copying a file only once, so the / I does not apply.

You probably can piping this command to F in the command and press the output:

  echo F | Xcopy .. \. \ Common \ %% a common \ %% a / i / d / c / v / s / y / f & gt; Nul  

(English version of non-Windows, but perhaps this is your least problem, provided that the file names with batch spaces are already unsuccessful: -))

You can try to create a long list of file names to copy:

  Settlock enabled extension enabled extension on LIST = for / f %% Set in (FilesToCopy.txt) LIST =! List! ".. \ .. \ general \ %% a" xcopy% LIST% mango / i / d / c / v / s / y / f  

for two pass at the beginning File is required, though. And it fails when the list of file names is more than 8190 characters.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -