Your scripts were very hekpful but they didn't work when you switch the view to listmode, expand the directory hierarchy in the same window and try to apply them on one of the subitems. The reason was that the $@ argument does only contain the selected filename without any path prefix. So I exchanged the $@ in every script with $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS.
IMPORTANT: Don't surround it with ", they are already contained in the variable.
'cd' into the script directory and execute

find . -type f -perm -100 -exec sh -c "sed 's/\$@/\$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS/g' '{}' > /tmp/tmp123; chmod 750 /tmp/tmp123; mv /tmp/tmp123 {}" \;

all in one line to accomplish this.

Reply

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options