copy-file-as-backup

Nautilus Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
6.1

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:

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

harivolker

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

Pling
0 Affiliates
Details
license
version 2011-04-25
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Nautilus Scripts from hardball:

hide-show-links
hardball
last update date: 13 years ago

Score 6.5

open-terminal-here
hardball
last update date: 14 years ago

Score 5.7

open-the-link-target-in-nautilus
hardball
last update date: 14 years ago

Score 6.1

where-is-this-icon
hardball
last update date: 14 years ago

Score 7.2

share-http-here
hardball
last update date: 14 years ago

Score 6.1

Other Nautilus Scripts:

Gflv2avi
acidc00l
last update date: 15 years ago

Score 5.0

My Movie Portal v3.2.8
iTechScripts
last update date: 13 years ago

Score 4.7

Browse Nautilus as root
SteveSims
last update date: 17 years ago

Score 5.0

Open Nautilus as Root
Mariux
last update date: 17 years ago

Score 5.0

Compare Strings
cdmn
last update date: 17 years ago

Score 5.0

grooto
pontos
last update date: 17 years ago

Score 5.0



System Tags