Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch file - replacing files by date
Name: Leena Date: June 5, 2001 at 12:00:00 Pacific
Comment:
I want a batch file to search for a virus scan program and check the date. If the date is not equal to the newer version date I want to replace that file with the newer version. Can anyone help?
Name: Dominatrix Date: June 5, 2001 at 12:08:50 Pacific
Reply:
Considering you already have the newer file, wouldn't it be easier to do it yourself by hand?
(As far as I know, Command.Com doesn't have direct comparision operators (e.g. >=), but you could write a batch file to execute a QBasic script that would do what you wanted.
0
Response Number 2
Name: Laurence Date: June 8, 2001 at 09:57:57 Pacific
Reply:
It can be done with batch, but requires a lot of hokus pokus. I haven't time to write something specific, but check: http://home7.inet.tele.dk/batfiles/main/batchfaq.htm#77
And http://home7.inet.tele.dk/batfiles/monthly/sep2000.htm
Summary: here is a new solution to delete old files by date -------------------------- example: delete all files that are older than today lsfdt -m lt -d t *.* > c:\temp\filelist.txt delflist c:\temp\filelist....