Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Identify file date  (Read 2368 times)

0 Members and 1 Guest are viewing this topic.

DonI

  • Guest
Identify file date
« on: July 09, 2010, 11:09:57 AM »
Assume the following: location-1 creates a database update file and creates a zip file. Location-2 receives the zip file and will download it only if they do not already have that file. I would like to modify the download batch file to at least identify the date/time of the file and display in on screen with a message that says 'this file was created on ____ at ____. If you have this update already, press ESC to abort.

So, my question is how to have the batch file look at the zip file, get the date/time, and display it on screen.

Later on we may want to automate this by having the batch file check the zip file against what is already on location-2 computer and abort or download - but for for now, I'm just interested in displaying the date/time.
thanks,

carlos55



    Starter

  • USA
    Re: Identify file date
    « Reply #1 on: July 16, 2010, 03:04:24 AM »
    C:\test>type   doni.bat
    @echo off

    dir /tc %1  |  findstr %1

    Output:

    C:\test>doni.bat  zee.bat
    05/30/2010  06:52 PM                87 zee.bat

    C:\test>
    USA