Computing.Net > Forums > Disk Operating System > Check created date on a file before

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.

Check created date on a file before

Reply to Message Icon

Name: Gambit001
Date: October 7, 2008 at 01:53:53 Pacific
OS: XP
CPU/Ram: 3.00
Product: Dell
Comment:

is it possible to check a file date using exists?

i want to do something like this in pseudo

IF todays File was copied to server then delete local file. there will only be one file per day.

so i was going to write a little batch file that is scheduled to run daily at a certain time but unsure how to check if the file is for today/current date

something like this but with a date comparison also

IF EXIST \\enterprise1701\common\DB_backups\LCID\SETRUST\DEV\dllcid.dmp
del d:\LCIDBackupDumps\DLLCID\dllcid.dmp

any help is greatly appreciated.

Cheers,
Craig



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: October 7, 2008 at 02:56:44 Pacific
Reply:

First off, you're not talking about DOS.

Rather than using a file date check. You may want to compare the two files; which seems more to the point.

===========================================
fc c:\src\myfile s:\dest\myfile > nul
if errorlevel 1 goto :eof
del c:\src\myfile


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: Gambit001
Date: October 7, 2008 at 06:11:21 Pacific
Reply:

if its not DOS then what is it?

file compare isnt really that efficent as file sizes are over 1GB in size. they are database dump files

cheers,
Craig


0

Response Number 3
Name: itguru
Date: October 7, 2008 at 10:17:03 Pacific
Reply:

XP = NT COMMAND PROMPT

This is not MS-DOS it is more akin to it's grandaddy OS/2...............


0

Response Number 4
Name: alexanrs
Date: October 11, 2008 at 15:19:58 Pacific
Reply:

You could always grab some free command-line C compiler and create a small utility that would compare the file times and return an errorlevel accordingly


0

Response Number 5
Name: Gambit001
Date: October 28, 2008 at 10:24:25 Pacific
Reply:

ended up making a small vb6 app which done all i need


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

emm386 and memmaker Dos on disk-on-module



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Check created date on a file before

current date as a file or directory name www.computing.net/answers/dos/current-date-as-a-file-or-directory-name/1664.html

run output to a file with date on the en www.computing.net/answers/dos/run-output-to-a-file-with-date-on-the-en/6195.html

TIme and date from a file www.computing.net/answers/dos/time-and-date-from-a-file/16911.html