Hi. While user in this thread http://newsgroup.xnview.com/viewtopic.php?f=57&t=30942 was satisfied, working with files and paths containing nonalphabetical characters in their names might be troublesome. I'd like to propose change in command design for your consideration. Keep -o as key for defining base output filename string. Use another key for aItering base name if needed, -om for example.'nconvert -help' wrote: -no# : # not used for numeric operator
-o filename : Output filename
Use # to specify position of numeric enumerator
Use % to specify source filename
Use $ to specify full source pathname
Use $$ to specify source folder name
Use $EXIF:DateModified[date format] to specify EXIF date modified
Use $EXIF:DateTaken[date format] to specify EXIF date taken
Set for this key syntax something like
Example:'-om imaginary syntax' wrote:-om position:modifier[;position:modifier[;position:modifier...]]
positon - position in base filename where modifier must be inserted (if few modifiers share the same target position, precedence goes in order they stand in command string)
modifier - some operator (# for numeric enumerator, % for original filename, $$ for source folder name, "text" for inserting text etc.)
Code: Select all
nconvert.exe -o "My % cRaZy $ NamEd FiLe #" -om 1:$$;26:#;26:" which once was ";26:% -resize longest 100 "C:\Pictures Directory\original.jpg"
Disadvantage: you have to count position for inserting new parts, command string gets longer and you lose visual simplicity of name changing.
Advantage: you don't have interpretation conflicts in base output filename, any allowed characters may be used and -om may not be used at all if not needed.
I hope you get the idea, implementing it could be done some other way.
I don't propose using reserved characters from this list instead of currently used #%$ because nconvert is crossplatform (or do versions for Win, Mac and Linux differ?), and some of reserved in Windows characters are allowed in filenames in Unix.