Batch file to run based on the date and time

By sathishfiles ·
Tags: Off Topic
Need help for batch file as im not gud in it.
The scenario is i need to copy emails .msg file over network folder which i have already shared.
the problem is all the .msg file looks like this wit numbers: 10005.msg,100052,100053,100054..etc incremental numbers.
I need to copy based on the day and time, let say on monday from 12am-12pm, Tuesday copies the prev day 12pm-12am. Wed,thurs,friday,sat and sun. so that i dont miss and emails..based on the day and time. The .msg files are incremental and i dont want to copy the same emails .msg files.

C:\backup\(inside all the emails .msg files stored) need to copy to X:\archive\(in here)

Gues the best way of doing this is based on the date and time.
Right now im copying it manually based on the date and time. Any one pls help me ..

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -


by Snuffy09 In reply to Batch file to run based o ...

use the xcopy command (in windows XP or &gt

syntax example: xcopy /switches "source" "destination"

play with the /d switch for date (dont focus on the file name "date" but the actual date the file was created/changed/modified)

Collapse -

What you need is a simple...

...NTBackup Schedule. If you are running any flavour of Windows since NT3.5 and upto XP, you will be able to go to Start, Run, NTBackup.exe and set up a schedule based on the time and date and to a specific, and in your case, I presume a network (X:) location. In WinVista, you will need to run C:\Windows\System32\sdclt.exe for Windows Backup.

In both, select the folder that needs to be backed up, then select the location (vice versa, in Vista), then set a schedule.

Related Discussions

Related Forums