Copy files ignoring date stamp

Author Message
diede

  • Total Posts : 3
  • Scores: 0
  • Reward points : 0
  • Joined: 11/28/2011
  • Status: offline
Copy files ignoring date stamp Monday, November 28, 2011 3:26 AM (permalink)
0
I would like some help with the following issue:
I want to backup PST files, but only files that are really modified. Every time a users opens Outlook the PST file gets a new date stamp, although nothing changed. The file size is identical to the old one, but the 'new' PST file will be copied to the server, overwriting the old one cause of the new date stamp. Those PST files can be up to 3 or 4 gig, so that's a lot of traffic and the main thing: it takes a lot of time. 
 
I would like to write a script that rather looks at file size rather than date stamps.
- when the PST file has a different date stamp but same size: nothing happens.
- when the PST file has a different (smaller or bigger) size: overwite the server file.
 
Thanks!
 
 
#1
    ebgreen

    • Total Posts : 8219
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:Copy files ignoring date stamp Monday, November 28, 2011 3:49 AM (permalink)
    0
    So how do you currently look at the date? Please show us your code.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      diede

      • Total Posts : 3
      • Scores: 0
      • Reward points : 0
      • Joined: 11/28/2011
      • Status: offline
      Re:Copy files ignoring date stamp Monday, November 28, 2011 4:05 AM (permalink)
      0
      At the moment I run a batch script to copy the files with the xcopy function.
       
      #3
        ebgreen

        • Total Posts : 8219
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: offline
        Re:Copy files ignoring date stamp Monday, November 28, 2011 4:19 AM (permalink)
        0
        You might want to look at Robocopy. When a file is altered the OS sets the Archive Flag on that file. Robocopy has the ability to only copy files with the Archive flag set. And you can even tell it to reset the archive flag after the copy.
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4
          diede

          • Total Posts : 3
          • Scores: 0
          • Reward points : 0
          • Joined: 11/28/2011
          • Status: offline
          Re:Copy files ignoring date stamp Monday, November 28, 2011 4:21 AM (permalink)
          0
          Thanks for the quick replies, I'll have a look at that.
           
          #5

            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2012 ASPPlayground.NET Forum Version 3.9