如何将图像从一个驱动器复制到另一个驱动器与相同的子文件夹路径和不复制我想要显示的路径 [英] How Do I Copy Images From One Drive To Another Drives With Same Sub Folder Paths And On Not Copying I Want That Path To Be Displayed
问题描述
我有一个问题。考虑我将100个图像从一个驱动器复制到另一个驱动器。
copy / Yd:\\\\\\\\\\\\\\\\\\\\\ .pngc:\\\\\\\\\\\\\ log.txt
copy / Yd:\\\\\\\\\\\\\\\\\\\\\\\\\\\ >> log.txt
copy / Yd:\log\games\images\285.pngc:\\\\\\\\\\\\\\\\\\\\\\ >> log.txt
copy / Yd:\ log\games\images\284.pngc:\\\\\\\\\\\\\\\\\\\\\ >> log.txt
这只是一个例子。我有成千上万的这样的图像移动。
i只想让日志显示路径'如果找不到图像或任何错误
目前它显示系统无法找到指定的路径。
i希望它显示它没有复制的图像或至少它执行的cmd。
就好像是否出现故障
copy / Yd:\\\\\\\\\\\\\\\\\\\\\\\\ \ games \ images'\\ 2.85.png>> log.txt
我希望它能回显我与之关联的命令或行。这是循环的可能吗?或者你可以建议我一个更好的复制方式。
提前谢谢。
Hi,
I have a question. consider i am copying 100 images from one drive with same path to another drive.
copy /Y "d:\log\games\images\283.png" "c:\log\games\images\283.png" >> log.txt
copy /Y "d:\log\games\images\289.png" "c:\log\games\images\289.png" >> log.txt
copy /Y "d:\log\games\images\285.png" "c:\log\games\images\285.png" >> log.txt
copy /Y "d:\log\games\images\284.png" "c:\log\games\images\284.png" >> log.txt
this is just an example. i have thousands of images like this to move.
i just want the log to show me the path 'if image not found or any error
currently it is showing "The system cannot find the path specified."
i want it to display me which image it didn't copy or atleast the cmd it executed.
like if there is a failure on
copy /Y "d:\log\games\images\285.png" "c:\log\games\images\285.png" >> log.txt
i want it to echo me the command or line linked with it. is this possible with looping. or if you can suggest me a better way to copy.
Thanks in advance.
推荐答案
更好方式:
copy / Yd:\\\\\\\\\\\\ log.txt
它会将所有png从d:复制到c:同名...
如果您想创建文件夹(如果它不存在),您将需要深入研究批处理文件 [ ^ ]运行:)
或者使用xcopy,我依稀记得有一个选项可以在复制过程中创建不存在的文件夹。 ..
如果这有帮助请花时间接受解决方案。谢谢。
Better way:
copy /Y "d:\log\games\images\*.png" "c:\log\games\images\" >> log.txt
It will copy all png from d: to c: with same names...
If you want to create the folder if it doesn't exist you'll have to delve into batch files[^] to run :)
Or use xcopy, I vaguely remember there is an option to create non-existing folders during copying...
If this helps please take time to accept the solution. Thank you.
这篇关于如何将图像从一个驱动器复制到另一个驱动器与相同的子文件夹路径和不复制我想要显示的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!