Robocopy(或xcopy)从文件中读取? [英] Robocopy (or xcopy) read from file?

查看:124
本文介绍了Robocopy(或xcopy)从文件中读取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一些excel表,它们都包含来自单个根目录的目录.无论如何,是否有robocopy(或类似程序)读取excel工作表作为输入,仅复制所选文件?

so I have a few excel sheets that contain directories all stemming from a single root directory. Is there anyway to have robocopy (or similar program) read the excel sheet as input to only copy over the selected files?

这是电子表格的格式:

NMMC c6 31b5ac6c-1377-4a86-90a0-73c6335907e3.IMG
NMMC 2e 1da3d2ec-526f-479a-9c09-90cb2cfad0b6.IMG
NMMC 8a f77168ad-2f35-490c-a2a8-25e9fa4ac0ea.IMG
NMMC 2f fc2162f8-7548-4921-b722-5899cbe54641.IMG
NMMC fc 1fe09fcd-3861-4de8-8bfd-4510ffa8f29c.IMG
hcri001 1b  243161b4-eef0-4d5c-9e42-dcea6772afdd.IMG
hcri001 a7  7e60ba72-fb8f-4d65-ae34-92b034c10e2e.IMG
hcri001 84  7934584f-7bc8-4450-bf6d-da58ac2ebb1a.IMG
hcri001 1a  cda461ab-fe9d-4b4f-87bf-43dab9dd8644.IMG
hcri001 2b  4f2c02b6-31c6-4d8b-975e-591778bcdfef.IMG
ICPS    8a  2aca38a8-4133-4972-a03f-8c3c15654df3.IMG
ICPS    89  8338f897-76c0-4f6f-9ae5-3b4c7e8a302c.IMG
ICPS    30  d9dba300-6c14-4484-a147-bccb9dd15aa3.IMG

我想将这些文件复制到具有相同结构的另一个文件系统中(例如,如果图像源自C:\Apps\Test\Site\NMMC\c6\31b5ac6c-1377-4a86-90a0-73c6335907e3.IMG,那么我需要将其复制到Z:\Apps\FileSystem\NMMC\c6\31b5ac6c-1377-4a86-90a0-73c6335907e3.IMG

I would like to copy these files to another filesystem with the same structure (For Example, if the image originates from C:\Apps\Test\Site\NMMC\c6\31b5ac6c-1377-4a86-90a0-73c6335907e3.IMG then I need it to copy to Z:\Apps\FileSystem\NMMC\c6\31b5ac6c-1377-4a86-90a0-73c6335907e3.IMG

这可能吗?

谢谢

编辑以消除混乱

推荐答案

好的,我想我已经拥有了.这是我正在运行的命令提示符脚本:

Ok, I think I pretty much have it. Here's the command prompt script that I'm running:

for /f "delims=, tokens=1,2,3" %i in ( D:\foo.csv ) do xcopy /i /y "Z:\%i\%j\%k" "D:\%i\%j\%k"

这正是我想要的,但是它尝试复制的每个文件都会出现一个提示,询问我是文件还是目录.无论如何,有没有告诉xcopy它们是所有文件?我以为/i就是这么做的,但这似乎并没有抑制提示.

This is doing exactly what I want, however for each file it tries to copy a prompt appears asking me if it's a file or a directory. Is there anyway to tell xcopy that they're ALL files? I thought that's what /i did, but that doesn't seem to suppress the prompts.

这篇关于Robocopy(或xcopy)从文件中读取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆