Photoname Portable, the command line arguments

These are the command line arguments that control the actions of pnp.exe, that you can send to it:

-fld [folder]

Renames all images in a specific folder. Specify the folder with images you want to rename, or type start to search for images in the same folder that pnp.exe is started from. Starting pnp.exe like this (from the command prompt):

pnp.exe -fld start

…has the same effect as double clicking it and type:

Rename Folder Start

Also, starting pnp.exe like this:

pnp.exe -fld “C:\Temp”

…has the same effect as double clicking it and type:

Rename Folder “C:\Temp”

-fle [filename]   Gives the specified file a new name. The file must be a jpg file that isn’t already renamed according to the Photoname convention.
-h Shows the available command line arguments.

Download Photoname Portable (25kb).

Photoname Portable

The portable version of Photoname (pnp.exe) doesn’t have a GUI, but it is pretty simple to use anyway. You can either start it from the command interface and pass arguments to it to tell it what to do, or you can double click on it, and then tell it what to do. If you want to control pnp.exe from another application, you must know what arguments you can pass to it.

So, pnp.exe is a portable, lightweight GUI-less version of Photoname.
Some of the commands that you can run if you start it without arguments, that is, just by double clicking it:

Load {Filename} loads an image into memory. If the path or filename contains a space, you need quotation marks around it. Example:

Load "C:\Images\CW005132.jpg"

To view information about the loaded image, type Info. If you provide a filename, that file is loaded and info about that file is displayed. Example:

Info

Info "C:\Images\CW005133.jpg"

To rename one single file, use Rename File {Filename}. Example:

Rename File "C:\Images\CW005134.jpg"

If you ignore the filename, the currently loaded file will be renamed. To rename all files, use Rename Dir {Directory name}. Example:

Rename Dir "C:\Images"

Files that already match the RegEx pattern \d{14}_\d*\.(jpg|jpeg) will be ignored. If photodate is missing in the file, the change date will be used instead. The renamed file will be unloaded from memory in the process of renaming.

Photoname Portable can only handle full path, not relative paths.

For each file that Photoname Portable tries to rename, the output will be a text line that starts with “Ok.” for successful name change and “Rename failed.” for unsuccessful name change.

If you want to use the portable version to rename all images that need renaming, without any tricky typing, you can just type Dir? in the command prompt. Photoname Portable will ask you for a directory, do the name changes and then exit. Example:

Dir?

If you are automating Photoname Portable from another application, consider not sending “Dir?” to it. ;-) The folder browser might show up behind the console window.

Download Photoname Portable (25kb).