Computing.Net > Forums > Programming > Batchfile - Get a filedate

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.

Batchfile - Get a filedate

Reply to Message Icon

Name: amb
Date: February 19, 2008 at 05:06:03 Pacific
OS: Win XP
CPU/Ram: Intel, 2GB
Product: Clone
Comment:

Just found this batchgoldmine, but couldnt find an answer for my problem.

Is it possible to get a filedate from a specific file or folder, and put that date into a variable for later use?



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: February 19, 2008 at 06:12:44 Pacific
Reply:

For %%j in (file-folder_name) Do Set FileDate=%%~tj
Set FileDate=%FileDate:~0,10%


0

Response Number 2
Name: amb
Date: February 19, 2008 at 06:40:54 Pacific
Reply:

Thats just perfect. Exactly what i needed spot on.

Thanks a lot for the quick reply.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Batch- Multiple word vari... Files rename using batch ...



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batchfile - Get a filedate

how do u get a machine's mac addres www.computing.net/answers/programming/how-do-u-get-a-machines-mac-addres/7213.html

getting a single file from a .exe www.computing.net/answers/programming/getting-a-single-file-from-a-exe/10357.html

Get a Folder size in a batch file www.computing.net/answers/programming/get-a-folder-size-in-a-batch-file/9587.html