backup and sync

버전 1.1.0.0 (10.7 KB) 작성자: Zhiqiang Zhang
backupfolder - backup a folder, syncfolder - sync folders, revertbackup - revert previous backups
다운로드 수: 862
업데이트 날짜: 2011/5/31

라이선스 보기

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

인용 양식

Zhiqiang Zhang (2024). backup and sync (https://www.mathworks.com/matlabcentral/fileexchange/29230-backup-and-sync), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Source Control Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

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

1.0.0.0