Jump to content

Recommended Posts

Posted

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

Posted

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

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
  • Recently Browsing   0 members

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