Looking for a good batch file management utility
Looking for a good batch file management utility
Author
Discussion

GhostyDog

Original Poster:

464 posts

238 months

Wednesday 17th October 2007
quotequote all
Hi,

I need a decent batch file management util, something that can say for example take 5000 files from 'folder a' and move them to 'folder b' without crashing. Folder a can contain anything up to about 80,000 files with n other folders.

Also a nice thing to have would be able to do the same thing based on modified date ranges.

Cheers

Sean

GhostyDog

Original Poster:

464 posts

238 months

Wednesday 17th October 2007
quotequote all
Sorted it using the windows FSO in a visual basic script. thanks for all the replies tongue out

jamieboy

5,932 posts

260 months

Wednesday 17th October 2007
quotequote all
Best bet is probably a bit of VBScript - use the filesystem object, and you should get where you want. biggrin

Although robocopy would have been my first suggestion.

GhostyDog

Original Poster:

464 posts

238 months

Wednesday 17th October 2007
quotequote all
jamieboy said:
Best bet is probably a bit of VBScript - use the filesystem object, and you should get where you want. biggrin

Although robocopy would have been my first suggestion.
Hiya mate,

Just looked into robocopy, is this what you mean?

http://www.microsoft.com/technet/technetmag/issues... << think this is a gui coded for the commandline tool

I think i'll stick with FSO, I know it works albeit without any nice little progress bars or indication of success/failure...

Not really done much vbscripting but it's not far removed from shellscripting for *nix and i've done shed loads of that frown

Cheers for the headsup

Sean


jamieboy

5,932 posts

260 months

Wednesday 17th October 2007
quotequote all
GhostyDog said:
Just looked into robocopy, is this what you mean?

http://www.microsoft.com/technet/technetmag/issues... << think this is a gui coded for the commandline tool
Every day's a schoolday for me - I didn't even know there was a GUI for it...

That is the tool I meant, but I've only ever used the command-line version. There's pages of switches you can use with it to copy or move stuff based on date, or size, or whatever.

VB script will give you more flexibility, and it's not hard at all once you get into it. Still worth having a look at robocopy for future reference. thumbup

MiniMac

8,026 posts

234 months

Wednesday 17th October 2007
quotequote all
Yeah robocopy is good. Its in the Windows Resource Kit which comes as a .msi.

We use it here to transfer huge amounts of data around. Really reliable and has tonnes of logging / file selection attributes.

GhostyDog

Original Poster:

464 posts

238 months

Wednesday 17th October 2007
quotequote all
Cheer's, i'll have a look into robocopy in more depth if I need to do anything more complex, no point reinventing the wheel is there?

This seems to be doing the trick for now, open text file copy this in save with vbs extension and your away. Inelegant in that you have to input the path manually into the code but hey ho, simple works.

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\source_path\*.msg" , "C:\dest_path\"


2 lines of code is all it took. smile

Sean

Edited by GhostyDog on Wednesday 17th October 16:09


Edited by GhostyDog on Wednesday 17th October 16:09