Re. comment #3 I only tested on paths with spaces in filename. It fails on folders with spaces. To fix, I changed:
--- /usr/share/nautilus-renamer/nautilus-renamer.py 2014-08-03 08:26:12.975538999 +1000 +++ bin/nautilus-renamer.py 2014-08-29 05:53:28.177893435 +1000 @@ -1061,9 +1061,10 @@ if __name__ == '__main__': files = [] # get current directory - common_prefix = os.path.commonprefix (sys.argv[1:])[len("file://"):] + common_prefix = os.path.commonprefix (sys.argv[1:])#[len("file://"):] cwd_pos = common_prefix.rfind ('/') cwd = common_prefix [:cwd_pos] + cwd = Gio.File.new_for_uri(cwd).get_path()
if not cwd: raise RuntimeError ("Unable to determine current working directory.")
Re. comment #3 I only tested on paths with spaces in filename. It fails on folders with spaces. To fix, I changed:
--- /usr/share/ nautilus- renamer/ nautilus- renamer. py 2014-08-03 08:26:12.975538999 +1000 renamer. py 2014-08-29 05:53:28.177893435 +1000 commonprefix (sys.argv[ 1:])[len( "file:/ /"):] commonprefix (sys.argv[ 1:])#[len( "file:/ /"):] new_for_ uri(cwd) .get_path( )
+++ bin/nautilus-
@@ -1061,9 +1061,10 @@
if __name__ == '__main__':
files = []
# get current directory
- common_prefix = os.path.
+ common_prefix = os.path.
cwd_pos = common_prefix.rfind ('/')
cwd = common_prefix [:cwd_pos]
+ cwd = Gio.File.
if not cwd:
raise RuntimeError ("Unable to determine current working directory.")