+ Post New Thread
Results 1 to 4 of 4
MIS Systems Thread, Script to copy .bak files with todays date to nas in Technical; Hi I need a script to copy todays .bak files with the current date to another location. Thanks...
  1. #1

    Join Date
    Feb 2008
    Posts
    326
    Thank Post
    51
    Thanked 3 Times in 3 Posts
    Rep Power
    14

    Script to copy .bak files with todays date to nas

    Hi I need a script to copy todays .bak files with the current date to another location.

    Thanks

  2. #2

    creese's Avatar
    Join Date
    Feb 2009
    Location
    -28° 31' 48.89", +28° 25' 37.42" ... if only.
    Posts
    3,254
    Thank Post
    181
    Thanked 375 Times in 304 Posts
    Rep Power
    174
    The date bit

    set FileDate=%date:/=%
    ren C:\Folder\file.bak Folder%filedate%.7z

    then Xcopy

  3. #3
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,475
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    52
    HI

    I know this will be a silly question but why dont you just backup to the nas drive.

    Richard

  4. #4

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,008
    Thank Post
    680
    Thanked 1,397 Times in 1,157 Posts
    Rep Power
    353
    My .bak files are already named with the date aren't yours? It should be easy to deal with them.

    Xcopy will handle files based on the modified or created date wont it? If not, use the archive bit , so it will always copy any new files placed in the folder to your chosen destination and clear the flag after.

    It doesn't do the same thing, but you might also want to look at matt40k's tidy backups routine which zips .bak files and deletes those older than a certain date.

    Do you want the script writing for you or just guidance?

SHARE:
+ Post New Thread

Similar Threads

  1. Request for script to copy files
    By TechSupp in forum Scripts
    Replies: 5
    Last Post: 15th July 2010, 01:34 PM
  2. Replies: 16
    Last Post: 25th February 2010, 08:59 AM
  3. Replies: 5
    Last Post: 17th September 2009, 10:52 PM
  4. Replies: 19
    Last Post: 20th June 2006, 03:53 PM
  5. script to copy files to machines
    By browolf in forum Scripts
    Replies: 1
    Last Post: 28th November 2005, 10:28 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •