windows - Robocopy (or xcopy) read from file? -


so have few excel sheets contain directories stemming single root directory. there anyway have robocopy (or similar program) read excel sheet input copy on selected files?

this format of spreadsheets:

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 

i copy these files filesystem same structure (for example, if image originates c:\apps\test\site\nmmc\c6\31b5ac6c-1377-4a86-90a0-73c6335907e3.img need copy z:\apps\filesystem\nmmc\c6\31b5ac6c-1377-4a86-90a0-73c6335907e3.img

is possible do?

thanks

edited clear confusion

if want avoid writing office interop code suggestion following:

first, in excel save data csv file path c:\temp\foo.csv. create datafile looks following:

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 

next, open command prompt , write following command:

for /f "delims=, tokens=3" %i in ( c:\temp\foo.csv ) echo %i 

this output file names (and file names). once happy working change "echo %i" whatever xcopy command want.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -