how to pull everything out of subfolders

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
tim167
Newbie
Posts: 13
Joined: Thu Sep 16, 2004 11:38 am

how to pull everything out of subfolders

Post by tim167 » Fri Jun 17, 2005 9:57 am

another thing I would like to be alble to do:
for any given folder perform the following action:
if the folder contains files in subfolders, move them to the main folder and remove the subdirectories so that you get a folder containing all files in the same place.
Maybe this is a command line thing ?
Maybe someone already made a script for this?

thank you
Tim

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Jun 17, 2005 10:03 am

Again, use FileSystemObject. Search this forum for FileSystemObject and Subfolders. FileSystemObject has a subfolder property so you can locate and iterate through subfolder files and simply move each one in turn to the parent folder.

These should give you some clues.

http://www.mjtnet.com/forum/viewtopic.p ... +subfolder
http://www.mjtnet.com/forum/viewtopic.p ... +subfolder
MJT Net Support
[email protected]

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts