Variables

Variables are used to bring dynamic information into your import profiles. When you're editing a import profile, you can get a list of all available variables for each step with the '?' symbol .

Which variables are available depends on the steps your import profile contains. Some steps even allow you to rename the variables they create.

The following variables are always available:

VariableDescription
NAMEThe pictures original name
PDATEThe date the picture was shot
PTIMEThe time the picture was shot
NUMThe pictures number
NUMFThe pictures number within it's folder
DATEThe actual date
TIMEThe actual time
RESXThe pictures width (pixel)
RESYThe pictures height (pixel)
EXTThe pictures filetype
FILESIZEThe pictures size (bytes)
EXIF:xyzEXIF Field Nr. xyz
EXIFTOOL:xyzEXIFTOOL Field xyz
CBLANKConditional blank.
CBLANKRConditional blank, right side
CBLANKLConditional blank, left side
NUMBEROFPICSThe amount of images to be imported.

The variables have to be enclosed in brackets (<...>):


This setting will create folders named by the date the pictures were shot and a keyword.
A group number will be appended to the pictures name to group pictures which are shot within
a certain time span.

Subfolders

WIA-Loader can also create subfolders:


This would create a folder named by the first entered keyword.
Within this folder, there will be created subfolders for each date pictures where shot, and within these subfolders there will be created more subfolders for each group of pictures:


Formatting of date/time and numeric variables

The output of some variables can be customized.
The desired format just has to be specified like this example on <PDATE>:


Just returns the year in four digits.


Just returns the year and the month.

Note: this way, you could use <PDATE> to output just the pictures time, if you only use time-specific formatters (see below). This makes the variables <TIME> and <PTIME> useless.

Some date, time and numeric formats:

	Date: (works for <PDATE> and <DATE>)
	y     - Month and year: February 2008
	yy    -	The year in two digits: 08
	yyyy  - The year in four digits: 2008
	M     - Day and month: 27 February
	MM    - The month as a number: 02 
	MMM   - The month in three letters: Feb
	MMMM  - The month completely: February
	dd    - The day as number: 27
	ddd   - The day in two letters: We
	dddd  - The day completely: Wednesday
	
	Time: (works for <PDATE> and <DATE>)
	hh    - The hour in two digits, 01 - 12
	HH    - The hour in two digits, but in 24-hours format: 00 - 23
	mm    - The minute in two digits
	ss    - The second in two digits
	t     - The time without seconds
	T     - The time with seconds	
	
	Numbers: (works for <NUM>, <NUMF>, <RESX>, <RESY>, <TGROUP>, <TGROUPPICTURE>)
	0     - Just the number
	00    - The number in two digits
	000   - The number in three digits
	0000  - The number in four digits
	 

A complete list of all format specifiers can be found here:
http://msdn2.microsoft.com/en-us/library/az4se3k1.aspx
http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx

Cutting single characters or character ranges

If you want to use just a part of avariables result for, you can tell WIA-Loader to cut characters from those results.

The variable <NAME> usually return the original name of a picture. This could be DSC_1234.JPG for example. Let's say, we don't want to have the prefix DSC_ anymore:

We can easily cut the first 4 characters from our pictures name:
<NAME:|5->

If we want to keep the DSC_, but want to get rid of the numbers:
<NAME:|-4>

We could cut everything but the _:
<NAME:|4>

Or we could cut everything but a range from the middle: SC_12
<NAME:|2-6>

Conditional blanks

The variables CBLANK, CBLANKR and CBLANKL are used to insert blanks under
the condition that there are no other blanks next to that position.
<CBLANK> for example will only be turned into a blank when
there is no other blank before or after it.

Example:
We want to write the filename, a keyword a a groupname into a arbitrary
EXIF field. We're using the following string:
<PNAME><ASK><PGROUPNAME>

If all 3 variables contain a value, we will get something like this:

DSC_1234.JPGHolidaysDay1

Not very good, so we insert blanks:

<PNAME> <ASK> <PGROUPNAME>

The result looks quite good when all 3 variables contain a value,
but what happens if we didn't enter a keyword, and the variable
ASK is empty? We would get something like this:

DSC_1234.JPG  Day1   (notice: 2 blanks between JPG and Day)

Better, but we want to reduce the 2 blanks in the middle to a single one.
This is where <CBLANK> comes in:

<PNAME><CBLANK><ASK><CBLANK><PGROUPNAME>

We replace the normal blanks with CBLANK and we'll get the desired result:

DSC_1234.JPG Day1

The second CBLANK has not been turned into a blank because it would
stand right next to the first one. A CBLANK will only be turned into
a blank when there are no other blanks left or right of them.
CBLANKL and CBLANKR work similar. The difference is that they only
look at one side for another blank, the other side is ignored.

Back

© 2008 Patrick Mortara