Computer Hope

Microsoft => Microsoft Windows => Windows NT/2000 => Topic started by: spjamjai on September 28, 2005, 07:12:28 AM

Title: Run a batch file only particular dates
Post by: spjamjai on September 28, 2005, 07:12:28 AM
HI,

I am new to this forum. I have to copy a file to a particular directory. Can any one help me how can a batch file run on particular dates? For example, my task is to run this batch file only on 13,14,15 and 16 of every month.

Below is the code I tried:

@ECHO OFF
IF EXIST C:\test1.txt (COPY C:\test1.txt C:\test.txt) ELSE ECHO test1.txt is not found
pause



Thanks in advance
Jai

Title: Re: Run a batch file only particular dates
Post by: Dusty on September 28, 2005, 03:48:01 PM
But then you haven't stated which Windows version you are using so I will assume it's XP.......

I haven't tried it but perhaps the AT command issued at the command prompt would call your .bat file
Title: Re: Run a batch file only particular dates
Post by: spjamjai on September 28, 2005, 11:44:04 PM
I am sorry, I am working in Windows 2000 professional.
Title: Re: Run a batch file only particular dates
Post by: Dusty on September 29, 2005, 02:15:01 AM
Thankyou.  Win 2000 Pro should have the AT command.  Please go to the command prompt and type AT/? <enter> to get a listing of the options or here (http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/ntcmds.htm) for a command listing

Good luck