copy-file-as-backup

Nautilus Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on git.opendesktop.org

0
Score 54%
Description:

Creates a backup copy in the same directory, uses date and increments number for the filename. keeps extension. keeps tar.gz. can use the mtime of the file to backup.

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 !



Last changelog:

7 years ago

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

harivolker

7 years ago

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

Report

7 years ago

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

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
2011-04-25
updated Apr 25 2011
added Nov 14 2010
downloads today
0
page views today 1
System Tags addon