Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 1127
Product
JFile
Version
3.0
Title
How can I set JFile's file selector to open in the Windows "My Documents" directory by default?
Solution

On machines where the logged-on user's name is part of the path to the "My Documents" directory, (windows xp, windows 2000) you can use the Windows system variable, "%userprofile%\My Documents%" with the windows file selector to automatically resolve to the correct path. Please note, this is not effective when the UseNativeFileSelection parameter is set to "0"; you must use the windows file selector so that the userprofile variable can be correctly resolved. Do this by setting the UseNativeFileSelection parameter to "1".

<param name="UseNativeFileSelection" value="1">
<param name="DefaultDirectory" value="%userprofile%\My Documents">

In windows 95/98, simply use "C:\My Documents". The system variable is not needed if the logged-on user's name is not part of the path.

Created : 5/3/2005 3:24:44 PM (last modified : 5/3/2005 3:24:43 PM)
Rate this article!
 
Comments