Monday, June 18, 2018

how to rename the old files or backup them into a folder when there are file names collision?


As you know, the default windows copy handler renames the new files if you choose "keeps both files" . What program can i use to rename the old files instead? or better, put all the old files into a backup folder at the same location, each with its own path structure?


Answer



rsync --backup would do what you want. You can specify a suffix for old files using --suffix, or move old files to a different folder using --backup-dir.


No comments:

Post a Comment