Link to home
Start Free TrialLog in
Avatar of s_kennedy
s_kennedyFlag for Canada

asked on

How do I recursively move and rename multiple files in multiple folders?

I would prefer a method of doing this in Linux, but Windows would be acceptable.

Suppose I have one folder "documents", containing three folders, A, B,C, each containing three files, 1.txt, 2.txt, 3.txt.

I want to move and rename all the files into "documents", such that the names are A-1.txt, A-2.txt, A-3.txt, B-1.txt, B-2.txt, etc.

How can I do this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of s_kennedy

ASKER

I had to replace "A B C" with "*" for the general case, but it worked great, thanks.