开发者

Command Prompt and batch files

开发者 https://www.devze.com 2023-01-08 16:47 出处:网络
I\'m trying to copy a number of files from a directory. I want to include the file path from the base of this particular directory tree, however, I only have a list of the file names to go by. Is ther

I'm trying to copy a number of files from a directory. I want to include the file path from the base of this particular directory tree, however, I only have a list of the file names to go by. Is there a way to copy either:

  1. a list of file开发者_JAVA百科s with their directories appended to the beginning in a .txt file
  2. a copy of the folders in the directory with copies of the files placed in their original places in the original directory.

Each file in the directory has a unique name.

I've looked all over google, but the closest I've found is xcopy, which I don't believe is capable of this.

Thanks!


For the second option you can use xcopy /s or robocopy /s. Both are great tools for this kind of job.

0

精彩评论

暂无评论...
验证码 换一张
取 消