
copy-file-as-backup
Source (link to git-repo or to original if based on someone elses unmodified work):
example:
for /tmp/foo.pl
first copy creates /tmp/foo~2001091101.pl
the second copy (the same day) creates /tmp/foo~2001091102.pl
formats availables:
- foo~20010911-01.pl
- foo.2001-09-11-v001.pl
- foo_2001-09-11_10:30:55_copy1.pl
- foo~rev001.pl
how to install:
copy to ~/.gnome2/nautilus-scripts/ and make this script executable.
http://g-scripts.sourceforge.net/faq.php
please report any bug !
binaries/packages needed
perl, gvfs-mount, zenity
important:
you could have to change in the script the variables which depends on your system.
example:
BASENAME='/usr/bin/basename' on Debian or Ubuntu, but
BASENAME='/bin/basename' on Fedora.
any comments are welcome !
2011-04-25:
- multi selection
- hidden files correctly handled
- can use the modification time of the file rather than the current time, to rename it
- can move rather than copy
2010-12-15:
using URIs :
it works now even if you do a backup-copy of a file which is on a mounted by gvfs file system (for example smb://windows/share)
2010-12-02:
add examples for the format
/tmp/foo.pl to /tmp/foo~2001091101.pl
/tmp/foo.pl to /tmp/foo.2001-09-11-v001.pl
/tmp/foo.pl to /tmp/foo_version-001.pl
/tmp/foo.pl to /tmp/foo_2001-09-11_10:30_1.pl
2010-11-25:
correction for tar.gz
Ratings & Comments
1 Comment
Instead of BASENAME='/usr/bin/basename' why not just BASENAME="`which basename`" This would automagically set ${BASENAME} to /usr/bin/basename on debian or /bin/basename on fedora :-) Volker