backup and sync

backupfolder - backup a folder, syncfolder - sync folders, revertbackup - revert previous backups
868 download
Aggiornato 31 mag 2011

Visualizza la licenza

copytofolder backup a folder under another folder.

backup(p1, p2) backup the folder p1 under p2. It will make a directory named today's date under p2. The backup will backup all the modified and newly added files but ignored the unchanged files.

------------------------------------------------------------------------------
REVERTBACKUP revert backups

revertbackup(revertPath, backupPath, savePath), 'backupPath' is a path to save the backups which are created by function 'backupfolder'. revertbackup reverts all files under 'revertPath' under 'backupPath', and saves newest version of every files. The 'savePath' is the path to save the reverted files.

revertbackup(..., begDate) only revert the backups later than begDate. The backups earlier than begDate wil be ignored.

------------------------------------------------------------------------------

SYNCFOLDER sync two folds

syncfolder(p1, p2, syncdirect), sync between p1 and p2. p1 and p2 are two directories. The exact behavior depends on the third parameter 'syncdirect'

syncdirect = 0, p1 and p2 are synced two-ways, i.e. the newest file will be the final one.

syncdirect = 1, p1 are synced to p2 (the change in p2 will not synced to p1);

syncdirect = 2, p1 are synced to p2, and the file in p2 but not in p1 will be deleted

syncdirect = -1, p2 are synced to p1;

syncdirect = -2, p2 are synced to p1, and the file in p1 but not in p2 will be deleted

syncdirect is 0 by default.

--------------------------------------------------------------
Test under windows XP & Matlab 2010b
Chinese introduce could be found here: http://zhiqiang.org/blog/it/sync-and-backup-using-matlab.html

Cita come

Zhiqiang Zhang (2025). backup and sync (https://it.mathworks.com/matlabcentral/fileexchange/29230-backup-and-sync), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2010b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Source Control in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

fixed a bug: user defined function "sortstruct" was missed before.

1.0.0.0