Command line question?

Hey, so...I have to create a batch file which will:

* backup all contents of a folder called 'myFiles' to a folder called 'myFilesBackup'.

* If 'myFilesBackup' doesn't exist, it should create it.

* If 'myFilesBackup' is empty it should copy all files including subdirectories.

* If 'myFilesBackup' is not empty it should copy only newer files, without prompting.

* not use absolute paths, only relative folder names.

Which command line should i use for this, i don't think copy would be able to perform all of the above. any help greatly appreciated

2 Answers

  • 1 decade ago
    Favorite Answer

    I see someone gave you the *nix answer... if you're using windows, I think you want xcopy.

  • Paul
    Lv 7
    1 decade ago

    % rsync -a ./myFiles/ ./myFilesBackup/

    Source(s): % man rsync
Still have questions? Get your answers by asking now.