Move only subfolders

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
dazedandconfused2
Newbie
Posts: 13
Joined: Tue Aug 29, 2006 1:50 am

Move only subfolders

Post by dazedandconfused2 » Tue Aug 29, 2006 10:06 pm

Hi

I have been searching the DB for an answer to this one but with no luck.

I need to move only subfolders (with all files in that subfolder) from a specific directory and leave any files that are in the main directory

Any help would be great.

Thanks

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Aug 29, 2006 10:13 pm

You may be able to so this by using *. to represent subfolders.

Unfortunately, this will also pick up filenames that have no suffix, but if you do have file suffixes, then *. will only select sub directories.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

dazedandconfused2
Newbie
Posts: 13
Joined: Tue Aug 29, 2006 1:50 am

Close

Post by dazedandconfused2 » Tue Aug 29, 2006 11:06 pm

Hmm

I should have spotted that one but help from a Humble man is always appreciated.

It's not a perfect solution but I like it and I think I can work with it.

Thanks very much

User avatar
JRL
Automation Wizard
Posts: 3505
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Aug 30, 2006 3:19 am

Try this to get a list of directory names. /b provides "bare" format leaving off date/time and size info, /ad provides directory names. Quotes are required surrounding path and file names that contain spaces.

Let>RP_WAIT=1
Run>cmd /c dir "[known path]\*.*" /ad /b > directory_list.txt


Later,
Dick

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