Jump to content

Copying a file with a date minus 1 day


Recommended Posts

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...