Changing DateStore's Folder Names

The wizard's DateStore feature automatically generates and assigns image storage folders named for specific date units: days, weeks, months, seasons, quarters, and years. For example, the following table shows the folder names that would be assigned by default to an image taken on August 29,2004, if My Pictures was the image storage root:

Date Unit

Folder Name

Day

My Pictures\2004 08 29

Week

My Pictures\2004 Week of 08-24

Month

My Pictures\2004 08 August

Season

My Pictures\2004-2-Summer

Quarter

My Pictures\2004 3rd Quarter

Year

My Pictures\2004

I can't think of any reason offhand why you'd want or need to change the format of these folder names. However, if you are technically inclined enough to use a text editor and follow instructions, you can if you want to.

Folder name formats are determined by "format strings" stored in a text file that the wizard reads when it starts up. If you have the stand-alone version of the download wizard, the file is named WDW.INI and is located in the folder where the wizard is installed. If you have the version of the wizard that is build into WhIP Suite, the file is named WHIP.XML, and is located in the Settings subfolder beneath the folder where WhIP Suite is installed.

Just to make matters more interesting, these two files store the format strings in different ways. When you open WDW.INI with your text editor, you will see a line that looks like this:

[DateStore]

followed by lines that look like this (along with some other stuff):

fmtDay=yyyy mm dd

fmtWeek=yyyy \W\e\e\k\ \o\f mm\-dd

fmtMonth=yyyy mm mmmm

fmtSpring=yyyy\-\1\-\S\p\r\i\n\g

fmtSummer=yyyy\-\2\-\S\u\m\m\e\r

fmtFall=yyyy\-\3\-\F\a\l\l

fmtWinter=yyyy\-\4\-\W\i\n\t\e\r\-

fmtQ1=yyyy \1\s\t\ \Q\u\a\r\t\e\r

fmtQ2=yyyy \2\n\d\ \Q\u\a\r\t\e\r

fmtQ3=yyyy \3\r\d\ \Q\u\a\r\t\e\r

fmtQ4=yyyy \4\t\h\ \Q\u\a\r\t\e\r

fmtYear=yyyy

 

Whereas when you open WHIP.XML, you will find a line that looks like this:

<section name="datestore">

followed by lines that look like this (along with some other stuff):

<item key="fmtday" value="yyyy mm dd" />

<item key="fmtweek" value="yyyy \W\e\e\k\ \o\f mm\-dd" />

<item key="fmtmonth" value="yyyy mm mmmm" />

<item key="fmtspring" value="yyyy\-\1\-\S\p\r\i\n\g" />

<item key="fmtsummer" value="yyyy\-\2\-\S\u\m\m\e\r" />

<item key="fmtfall" value="yyyy\-\3\-\F\a\l\l" />

<item key="fmtwinter" value="yyyy\-\4\-\W\i\n\t\e\r\-" />

<item key="fmtq1" value="yyyy \1\s\t\ \Q\u\a\r\t\e\r" />

<item key="fmtq2" value="yyyy \2\n\d\ \Q\u\a\r\t\e\r" />

<item key="fmtq3" value="yyyy \3\r\d\ \Q\u\a\r\t\e\r" />

<item key="fmtq4" value="yyyy \4\t\h\ \Q\u\a\r\t\e\r" />

<item key="fmtyear" value="yyyy" />

</section>

 

Despite the difference in formats, however, in each file you will find the same format strings, named in a way that you should be able to figure out which date unit they are used for. The format string used when you select the Month date unit, for example, is stored as

fmtMonth=yyyy mm mmmm

and

<item key="fmtmonth" value="yyyy mm mmmm" />

 

To change the folder names created by DateStore, you are going to change these format strings, save the file, then restart the wizard. Before making changes, though, a little info about how format strings work.

Format Strings

A format string can contain two different kinds of characters: format codes that get replaced with date info, and literal characters that are reproduced as is. There are many codes; a single "d" will display the day as a number without a leading zero (1-31), "dd" will display the day as a number with a leading zero (01-31), "ddd" will display the day as an abbreviation (Sun-Sat), etc. There are enough codes to create just about any representation of the date you can think of. All codes are listed and described in the lastt section of this topic.

There are no literal characters in the day or month format strings shown above; all characters in these strings are replaced with date info. All others, however, have characters that are simply reproduced. Consider the format string used when you select Week as the date unit:

fmtWeek=yyyy \W\e\e\k\ \o\f mm\-dd

 

You can see that all literal characters are preceded by a backslash. Known as an "escape", the backslash prevents the wizard from trying to interpret the character that follows it. Technically, it is not necessary to escape ALL literal characters, just those used in the codes listed below. As a practical matter, however, it is much faster and easier to just escape them all (though you can skip spaces if you want).

An Example

Suppose that instead of having the Week folder for 8/29/04 named

2004 Week of 08-24

you wanted it to be

2004 Week 36, Beginning Sunday August 24

To do so, we first need to know the codes to get the year as a 4 digit number, the week number, the full name of the day and the month, and the day number. Looking in the section below, we find these to be "yyyy", "ww", "dddd", "mmmm", and "dd", respectively. Then we string them together with the literals, remembering to escape them, and we get

fmtWeek=yyyy \W\e\e\k ww\, \B\e\g\i\n\n\i\n\g dddd mmmm dd

or

<item key="fmtweek" value="yyyy \W\e\e\k ww\, \B\e\g\i\n\n\i\n\g dddd mmmm dd" />

Edit the file accordingly, save it, and restart the wizard. You're done.

 

Format Codes

Character Description

(:) Time separator. In some locales, other characters may be used to represent the time separator. The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator in formatted output is determined by your system settings.

(/) Date separator. In some locales, other characters may be used to represent the date separator. The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in formatted output is determined by your system settings.

c Display the date as ddddd and display the time as ttttt, in that order. Display only date information if there is no fractional part to the date serial number; display only time information if there is no integer portion.

d Display the day as a number without a leading zero (1-31).

dd Display the day as a number with a leading zero (01-31).

ddd Display the day as an abbreviation (Sun-Sat).

dddd Display the day as a full name (Sunday-Saturday).

ddddd Display the date as a complete date (including day, month, and year), formatted according to your system's short date format setting. For Microsoft Windows, the default short date format is m/d/yy.

dddddd Display a date serial number as a complete date (including day, month, and year) formatted according to the long date setting recognized by your system. For Microsoft Windows, the default long date format is mmmm dd, yyyy.

w Display the day of the week as a number (1 for Sunday through 7 for Saturday).

ww Display the week of the year as a number (1-54).

m Display the month as a number without a leading zero (1-12). If m immediately follows h or hh, the minute rather than the month is displayed.

mm Display the month as a number with a leading zero (01-12). If m immediately follows h or hh, the minute rather than the month is displayed.

mmm Display the month as an abbreviation (Jan-Dec).

mmmm Display the month as a full month name (January-December).

q Display the quarter of the year as a number (1-4).

y Display the day of the year as a number (1-366).

yy Display the year as a 2-digit number (00-99).

yyyy Display the year as a 4-digit number (100-9999).

h Display the hour as a number without leading zeros (0-23).

hh Display the hour as a number with leading zeros (00-23).

n Display the minute as a number without leading zeros (0-59).

nn Display the minute as a number with leading zeros (00-59).

s Display the second as a number without leading zeros (0-59).

ss Display the second as a number with leading zeros (00-59).

t t t t t Display a time as a complete time (including hour, minute, and second), formatted using the time separator defined by the time format recognized by your system. A leading zero is displayed if the leading zero option is selected and the time is before 10:00 A.M. or P.M. For Microsoft Windows, the default time format is h:mm:ss.

AM/PM Use the 12-hour clock and display an uppercase AM with any hour before noon; display an uppercase PM with any hour between noon and 11:59 P.M.

am/pm Use the 12-hour clock and display a lowercase AM with any hour before noon; display a lowercase PM with any hour between noon and 11:59 P.M.

A/P Use the 12-hour clock and display an uppercase A with any hour before noon; display an uppercase P with any hour between noon and 11:59 P.M.

a/p Use the 12-hour clock and display a lowercase A with any hour before noon; display a lowercase P with any hour between noon and 11:59 P.M.

AMPM Use the 12-hour clock and display the AM string literal as defined by your system with any hour before noon; display the PM string literal as defined by your system with any hour between noon and 11:59 P.M. AMPM can be either uppercase or lowercase, but the case of the string displayed matches the string as defined by your system settings. For Microsoft Windows, the default format is AM/PM.