By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,372 Members | 1,950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,372 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 971
Yes, I have such a script. Why do you ask?

Sep 25 '08 #2

Expert Mod 2.5K+
P: 3,503
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

P: 2
very simple.

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


Mar 29 '09 #4

Expert Mod 2.5K+
P: 3,503
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.