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
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
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
Summary: I don't think I understand the question. If you can name a file or directory anything you want, provided that you use allowed charracters. If your trying to extract the system date, and save a file a...
Summary: In dos, your computer doesn't have a host name because it wasn't meant to be a networking OS. You can output the date to a file. You could set an environment variable to name the machine and then ge...
Summary: HELLO: I HAVE A PROBLEM I NEED TO KNOW HOW CAN GET THE TIME AND DATE FROM A OLD FILE ,I WENT TO THE PROPERTIES OF THAT FILE AND IS THERE ALL WHAT I NEED ,THE PROBLEM IS THAT IS NOT ALLOW ME TO COPY AT...