Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
#!/bin/bash
while [[ -n "$1" ]]; do
#if a file and not a dir
if [[ -f "$1" ]]; then
jhead -nf%m.%d.%Y_%H:%M "$1"
fi
shift
done
for i in *.JPG;
do mv $i `basename $i JPG`jpg;
done
It looks to me like the top part acts on a single file (since %f is the first selected file), while the bottom is acting on every file in the current directory. It seems like these tasks would better be separated-- for example, just make the action fix the file extension of the selected file, or perhaps have a separate action for fixing all file extensions in the directory, so that the operation isn't needlessly carried out repeatedly.
mzilikazi wrote:My camera always names everything with the .JPG extension so these tasks are actually quite perfect together.
It makes more sense using %F, but I think you could even put your file test and subsequent actions inside the for loop. It would probably save you a millisecond if you were dealing with hundreds of files. Maybe another approach would be to use %d, and change the glob to $1/*, so you wouldn't have to select a bunch of files at once.
This is one feature that I have found to be problematic in Thunar: the padding (i.e., the space in which you can click to bring up the selection rectangle) between icons is quite small, especially vertically. I often end up seeing a floating icon under the pointer instead of the selection rectangle.
#!/bin/bash
#rename2exif.sh
for PIC in "$@" ; do
extn=${PIC##*.}
exval=$(exiftime "$PIC" |grep Created|awk '{print $3"_"$4}')
mv "$PIC" "${exval:?NO EXIF DATA FOUND IN "$PIC"}".$extn
done
No need to test the file because if no exif data is found the process quits with the NO EXIF DATA... message.
#!/bin/bash
#rename2exif.sh
for PIC in "$@" ; do
extn=${PIC##*.}
exval=$(exiftime "$PIC" |grep Created|awk '{print $3"_"$4}')
mv "$PIC" "${exval:?NO EXIF DATA FOUND IN "$PIC"}".$extn
done
No need to test the file because if no exif data is found the process quits with the NO EXIF DATA... message.
This thread needs a bump. Here's a simple action to upload a text file to pastebin and give you the link in xterm.
Don't forget, xterm uses middle-button to copy/paste. Use middle-button to paste the link into your irc session or browser window, also.
Requires pastebinit:
I wrote this "Show Original" custom action to launch another thunar window and highlight (select) the file or folder that a soft link points to.
The steps are:
install "xdotool" if you don't have it installed already
create a "Show Original" thunar custom action:
appearance conditions: file pattern *, appears for "Directories" and "Other Files"
command: showoriginal %f
install this showoriginal script somewhere in your path: