Guest Naruto Posted January 4, 2008 Posted January 4, 2008 Hi, I want to robocopy files created yesterday (based on the "Date Modified" timestamp) It seems to me that the options /MAXLAD /MINLAD /MAXAGE /MINAGE are calculating based on 24 hrs timeframe. For example, if I use /MAXAGE:1 and robocopy at 3pm, I will get the logs from 3pm yesterday up to current time but not the logs at 2:59 pm yesterday. Please advise. Thanks in advance.
Guest Naruto Posted January 4, 2008 Posted January 4, 2008 RE: robocopy files created yesterday Of course I could schedule a job to run at every 12:00AM as a workaround. But this is not I want to achieve as some source servers may be busy at that time
Guest Pegasus \(MVP\) Posted January 4, 2008 Posted January 4, 2008 Re: robocopy files created yesterday "Naruto" <Naruto@discussions.microsoft.com> wrote in message news:43926DE4-5621-4F40-B5CA-44D5D900ACBC@microsoft.com... > Hi, I want to robocopy files created yesterday (based on the "Date > Modified" > timestamp) > > It seems to me that the options > /MAXLAD > /MINLAD > /MAXAGE > /MINAGE > are calculating based on 24 hrs timeframe. > For example, if I use /MAXAGE:1 and robocopy at 3pm, I will get the logs > from 3pm yesterday up to current time but not the logs at 2:59 pm > yesterday. > > Please advise. > Thanks in advance. Instead of specifying /MaxAge:n, specify /MaxAge:YYYYMMDD.
Guest Shoma Gujjar Posted October 24, 2008 Posted October 24, 2008 Robocopy with minage options for current date Robocopy with minage options for current date hi... u can try the below code to get the current date in yyyymmdd format and use it with robocopy along with minage: string current_date=DateTime.Now.ToString("yyyyMMdd"); proc.StartInfo.FileName="C:\\robocopy.exe"; proc.StartInfo.Arguments=""+ tempsrc + " "+ tempdst+" "+"/minage:"+@current_date+""; //+" "+"/mov"; proc.StartInfo.UseShellExecute=false; proc.Start(); proc.Close();
Recommended Posts