Batch file to copy paste

I need a batch file which will copy files which the modified date is not the current date from a folder A and paste it in folder B.

And

to delete files from folder B which is older than five days (from top)

And i need to schedule it in windows scheduler to run this at 15:00 . If the today's file not arrived at 15:00 it should run at 16:00 and again its not arrived 17:00 and so on ...till 23:00...

Please help me !
jaisonshereenAsked:
Who is Participating?
 
kram0Connect With a Mentor Commented:
Double-click will work. You could call it from the batch file with "wscript filename.vbs".
You could then schedule the batch file to run automatically.
0
 
kram0Commented:
"xcopy <source> <destination> /D /Y" will work to copy/overwrite files that are newer than what already exists in the destination.
As for deletion of older files, you may need to run something from vbs.
0
 
jaisonshereenAuthor Commented:
how to delete the file according to "modified date"?
0
 
kram0Commented:
This VBS looks to be pretty much exactly what you are after...
http://cwashington.netreach.net/depo/view.asp?Index=723
0
 
jaisonshereenAuthor Commented:
could you tell me how to execute this?

i have copy pasted the entire script as filename.vbs

is it a mater of double clicking?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.