Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been searching for a way to resolve this issue but can't find the right way. I have 3000 folders and need to extract a file out of each. It's slightly more complicated than that because of the file path which I have put below.

p:/asset management/planned maintenance/property file/3000 different property folders/06. asbestos/THE FILE I WANT TO EXTRACT.pdf

I have seen solutions to similar problems on here but none seem to fit what I'm trying to do here as they all have a slightly different file structure. They all seem to be C:/music/lots of files/mp3s (for example)

Any help would be greatly appreciated!

Cheers,

Pete

share|improve this question
2  
Do you know powershell? Or any other scripting language? –  Tom Feb 1 '12 at 9:34
    
In addition to @Tom's question, when you say extract, I assume you mean simply "copy", rather than extracting from a compressed file? –  Dan Feb 1 '12 at 10:50
add comment

1 Answer

If you need to do this only once you might use windows build in file find to get a list, then select them all and copy them. I do not recommend this as a daily task :)

If you have the unix find command you could do some like this:

find p:/asset management/planned maintenance/property file/ -name THE FILE I WANT TO EXTRACT.pdf -exec cp {} p:\Dir_I_want_them_copied_to \;

This makes find look at all files in p:/asset management/planned maintenance/property file
It only selects the files named THE FILE I WANT TO EXTRACT.pdf
-exec is then used to execute a command rather than list the files.

Caveeat: There is a FindUtil for windows package. However I did not test it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.