Im trying to have my batch script to copy a .log file from one folder and copy it to another folder only if the *.log file date modified is the same as the system date...can any one help me ?
Thanks & regards,
Vipin jha
Moving file when file date is the same as system date
Moderator: DosItHelp
-
- Posts: 3
- Joined: 24 Sep 2013 23:50
Re: Batch file query
What does this show with your log file name?
Code: Select all
@echo off
for %%a in ("file.log") echo "%%~ta"
pause
-
- Posts: 3
- Joined: 24 Sep 2013 23:50
Re: Moving file when file date is the same as system date
Hi ,
I am having tousand of log file in C:\IISLOGS Folder.
there are 1 file for 1 day, I want to move current date file from C:\IISLOGS TO D:\IISLOGS Folder.
My file format is like "ex130922.log"
Please sugest me script of doing the same.
thanks and regards,
Vipin jha
I am having tousand of log file in C:\IISLOGS Folder.
there are 1 file for 1 day, I want to move current date file from C:\IISLOGS TO D:\IISLOGS Folder.
My file format is like "ex130922.log"
Please sugest me script of doing the same.
thanks and regards,
Vipin jha
-
- Posts: 3
- Joined: 24 Sep 2013 23:50
Re: Moving file when file date is the same as system date
I am having Windows server 2000
Re: Moving file when file date is the same as system date
vipin_jha123 wrote:Hi ,
I am having tousand of log file in C:\IISLOGS Folder.
there are 1 file for 1 day, I want to move current date file from C:\IISLOGS TO D:\IISLOGS Folder.
My file format is like "ex130922.log"
I am having Windows server 2000
If you have Win 2000 then I need to know what this echos to the console:
Code: Select all
echo "%date%"