Xcopy question

Discussion in 'other software & services' started by n8chavez, Mar 16, 2007.

Thread Status:
Not open for further replies.
  1. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    2,305
    Location:
    Location Unknown
    I'm adding a backup option to my context menu. I want to make it so that whatever directory I'm in I can right-click on a file or folder and have it backed up to a certain location. This is the command I have so far:
    My question is: How do I maintain the same directory structure? If I want to backup c:\docs how can I make sure that they are copied to d:Backups\docs? As it is right now the "docs" subdirectory does not get copied.

    Any ideas?
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,702
    Hello,

    Like this:
    xcopy "C:\Docs\*.*" "D:\Backups\Docs\" /e

    Mrk
     
  3. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    2,305
    Location:
    Location Unknown
    That was just an example. I want to be able to backup whatever folder I right-click on to a subdirectory with the same name in D:\Backups.
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,702
    Hello,
    I did not give you an example - I gave you a working thingie.
    I use the above (except docs) to copy files and folders from one comp to another, running as script.
    Mrk
     
Loading...
Thread Status:
Not open for further replies.