Creating Batch File with Robo Copy


  1. Posts : 2
    Win7 x 64
       #1

    Creating Batch File with Robo Copy


    Hi
    I am currently running the following to supposedely create a directory IE V:\Backup Folder\Pictures\Backup 21-05-2012
    robocopy /e "c:\users\jon\pictures" "v:\Backup Folder\Pictures\Backup %date:~-10,2%-%date:~-7,2%-%date:~-4,4%"

    Evrything works fine except the backed up pictures folder is just named as V:\Backup Folder\Pictures\My Pictures

    If for arguments sake I backup my outlook file using the above parameters I get what I want EG
    V:\Backup Folder\Outlook\Backup 21-05-2012

    It's as though there is something within the pictures folder? that is preventing the corrctly named folder from beign created?
    The same happens when I try and backup Desktop and Documents folders
    What am I missing?
      My Computer


  2. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
       #2

    Big Tung said:
    Evrything works fine except the backed up pictures folder is just named as V:\Backup Folder\Pictures\My Pictures
    Hi,

    I can't quite understand where the \My Pictures is coming from. Do you mind posting a screen capture image of the folder arrangement, so I can see what it looks like?

    regards,
    Golden
      My Computer


  3. Posts : 2
    Win7 x 64
    Thread Starter
       #3

    Not sure how the \My Pictures folder is was being generated other that to suggest that perhaps a system\hidden file created it no matter what folder I tried to create and backup to.

    I have just this minute solved the equation with: -
    robocopy /e "c:\users\jon\pictures" "v:\Backup Folder\Pictures\Backup %date:~-10,2%-%date:~-7,2%-%date:~-4,4%" /XA:SH

    It now gives me exactly what I want i.e.
    v:\Backup Folder\Pictures\Backup 21-05-2012

    I would suggest the inclusion of /XA:SH, which I believe excludes system\hidden files from within the original My Pictures folder on C Drive is the answer and now allows me to create the folder that I want - not what the computer wants.

    Thank you for having a look in any case.

    Regards

    Jon
      My Computer


  4. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
       #4

    Hi,

    Thats great news - thanks for posting back your solution.

    Regards,
    Golden
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:20.
Find Us