Can I save folders & not files

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
lumpy
Newbie
Posts: 8
Joined: Sun Sep 29, 2002 9:31 am
Location: Lisburn

Can I save folders & not files

Post by lumpy » Sat Feb 19, 2005 11:29 am

I'm almost finished making a script to save the config. files of those programs that use them to another 2 locations for "safe keeping".

This is my last "hurdle".

In my email program folder I want to save just the folders to another location, not the program files, e.g.,
pocomail.exe
accounts.ini
etc. etc

I have copied these files over & overwrote the existing files, then set MSched to delete them, but I really don't want to copy them over in the first place. That's because I downloaded a (then) new version, installed it. Tried it, it looked good, so I saved all the files a folders.
the program had a big bug. I had to re-install the previous version. And any other possible mistakes I might well make.

Can I just copy over to another location only the folders.

I searched the forum & scripts, didn't see anything on this, but I found a couple of great usefull scripts, but not connected with this "problem".

thank you in advance.
Thank you.
Have a good day
Ian

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 » Sat Feb 19, 2005 6:48 pm

Don't know if this will help but

DIR *. will provide a list of only the folders in a branch. This could be redirected to a file and the file can be read in as a variable.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

lumpy
Newbie
Posts: 8
Joined: Sun Sep 29, 2002 9:31 am
Location: Lisburn

Post by lumpy » Sun Feb 20, 2005 4:15 pm

thanks Bob,

I thought of a way to do it in work this morning.

I just went into each folder, did a copy file using a wildcard, then copied to the same folder in another drive.

thus:-
DeleteFile>I:\C\windows\PocoMail3\Mail\*.*
copyFile>C:\Program Files\PocoMail3\Mail\*.*,I:\Windows\PocoMail3\Mail\

I tried it before I came into this super forum, it works.

however, I'm going to use your suggestion to see how it works.

Again, thanks heaps.
Thank you.
Have a good day
Ian

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