469,361 Members | 2,264 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

script to move files out of recursive subdirectories into one parent directory

does anyone have a perl script that will take all the files out of recursive subdirectories and move them into one parent directory ... have searched to the end of the earth and can't find anything.
Sep 25 '08 #1
4 6379
971 Expert 512MB
Yes, I have such a script. Why do you ask?

Sep 25 '08 #2
3,503 Expert Mod 2GB
I am sure that any of use here could produce one, but that would not help you learn how to do it. Besides, this is not a scripting service, but instead is a learning forum.

Why not try to do it and post your code here if you get stuck.


Sep 26 '08 #3
very simple.

find . -type f -exec mv {} /path/to/directory \;


Mar 29 '09 #4
3,503 Expert Mod 2GB
That is one way to do it using shell, but this is a Perl forum and if you read the thread, we are waiting for the OP to post the code that they have been trying.


Mar 29 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Yves | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.