Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to batch convert images between formats' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to batch convert images between formats
Authored by: Chiwo on Oct 09, '04 07:34:18PM

Looks to me like this script will only work if it's in the current directory, and won't work on any files with spaces or other unusual characters in their names, or in directories with spaces in their names. May I suggest a structure more like this sketch:


find "$1" -type f -name "*.$2" -print | while read file
do
  dest="`dirname "$file"`/`basename "$file" ".$2"`"
  rm -f "$dest"
  osascript etc. etc.
done
Still not bombproof but more likely to work.



[ Reply to This | # ]