当前位置: 动力学知识库 > 问答 > 编程问答 >

file - Use text/excel folder name list - search in 5 possible network folders and then copy folder and contents to destination folder

问题描述:

I tried google and searching many posts all over but I really cannot find what I need, or also lack the ability ( I do admit this is most likly the biggest obstacle ) to piece together some of the posts to form my own custom needs Powershell, Batch File or Script to do what I really am in need of.

I have a spreadsheet I have from a report. The only data that is usable to me are a Model Name.

If I sort the data I can get which models are most important to me in a list for current projects.

I want to:

Use excel or text file data of these model names

Search for those model names ( Which in this case are a folder on a server )

I need to search on 1 sever, but in about 5-10 folders on that server

Find that model name ( Folder) and copy the folder and it's contents to a Destination Folder Y:( In this case a usb hard drive)

My source folders on on a server:

\server\vendor\model\folder

I need to search for the model in the vendor folders.

If the script could just search in vendor, vendor1, vendor2, vendor3 , etc... until it finds the folder it needs to find and then copy it(and contents) to a drive letter at root level Y:\

I am not needing to keep source directory tree structure, or any other requirements. I just need the folders and all of them copied on a local drive so I can work with only those folders and not have to sort through hundred of other folders trying to find and work with what I need.

If possible, I am currently using Robocopy for other tasks and if this can be done with it that would be great. My preferred choice above all is a powershell script. Lastly, but still happily thankful would be a .cmd/.bat file script.Anything that works would carve hours off of getting set up.

Thank You,

Wayne

分享给朋友:
您可能感兴趣的文章:
随机阅读: