Click to See Complete Forum and Search --> : Batch File Hell...


Master Frodo UK
August 21st, 2006, 08:09 AM
Not sure if this is the correct place, but here goes..

I need some help creating a batch file that will check different folder locations and find folders that are 14 or more days old, copy them to a temp location and then delete from the temp location

The file locations do differ, they will be like this...
F:\Capacity\CCM\Work Area\OBR\Daily-all


The batch file would need to check all folders that are 5 layers deep, whats the command needed for the batch file to start looking at this level?

Thanks...

NooNoo
August 23rd, 2006, 03:54 AM
Are you thinking in terms of a DOS batch file or can you stretch to some VB?
Are the folder locations known?
What is the point of copying them before deletion?

Gabriel
August 24th, 2006, 02:40 AM
MMMmmm
Maybe forfiles is what you need
http://www.ss64.com/nt/forfiles.html
Just as Noonoo Mentioned - please elaborate on what you are trying to accomplish.

Cheers,
Gabriel

gemstone
August 24th, 2006, 04:27 AM
I wonder, NooNoo if there's a mistake in that he wants them deleting from where they are found after copying to a temp folder, it would make more sense.

El_Squid
August 30th, 2006, 09:44 AM
Oh, I remember the old ways, now! You mean he wants to perform a MOVE command rather than a COPY to a new location, then DELETE from the original location (which is the same thing). The ways of the Dark Place are coming back....