Main Page   Related Pages  

More Options


The most important option is the "help"-Option: It displays an overview over the usage of the SPF and all options that are available.

Use any of the following options to display the usage:

 SpecialFolderPath /?
 SpecialFolderPath --help
 SpecialFolderPath -h

The first variant is the most easy one: The help will also be displayed when SFP is run without any command line arguments at all.

See Usage for the usage information displayed.


When this option is specified, the respective system folder will not be created if it does not yet exist, and an empty string will be returned in order to indicate that fact.

This is an issue only for special folders such as "My Pictures", which are only created when certain applications are used.


 SpecialFolderPath --nocreate CSIDL_MYPICTURES

will display the path of the "My Pictures" folder, but only if it exists. Otherwise, just an empty line will be displayed.

When the --nocreate option is not being specified, the default is to create the folder if it does not yet exist.


Normally, the paths displayed by SFP are converted to the console character set before they are output.

This is usually necessary, because the Win32 function that provided the information to SFP uses the Windows code page, while the console (and batch scripts that run as console processes) may use a different code page.

So, if you use SFP to provide some path information to your batch script, the default of not using --not2oem is exactly what you want.

But if you intend to use the output of SFP in a Windows text file, you may specify --not2oem to leave the paths in the windows code page.

An example:

 SpecialFolderPath --not2oem CSIDL_PROGRAM_FILES >> info.txt

This will append the path of the "Program Files" folder to the current contents of the existing windows text document "info.txt", which may then be displayed using notepad.

Next: Application in batch files

Generated on Mon Jul 21 11:11:35 2003 for SpecialFolderPath by doxygen 1.3.1