Sign in to follow this  
Followers 0
joaopcrodrigues

Copying a file with a date minus 1 day

2 posts in this topic

Hello, I'm trying to write a littel sript that automaticly copies files with a certain date from a folder to another. Thats the easy part:

FileCopy ("N:\NAS\output\001\001_"& @MDAY & "_" & @MON & "_" & @YEAR & "_02_30_00_02_59_59.avi" "J:\2burn")

Now I need the same line but with the date of the day before.... current date minus 1.

Could someone help?

Thanks

Share this post


Link to post
Share on other sites



Welcome to the forums.

Look at the _Date functions- specifically _DateAdd().

This should get you started:

#include <Date.au3>
$sNewDate = _DateAdd('d', -1, _NowCalcDate())
MsgBox(4096, "", "Today - 1 day: " & $sNewDate)

Cheers,

Brett

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0