i have tried
System.getProperty("user.home") + "\Documents"
but this still points to the directory in c (default one) but does not
work in case i relocate it
if any one knows any system call, i mean OS dependent command that can
solve this problem will also be a great help...
any idea??

On 6/15/09, * ^ * <[email protected]> wrote:
>
> On Jun 14, 9:25 pm, iceman <[email protected]> wrote:
>> currently my windows is installed on c:\ and i have relocated my
>> Documents directory
>> i need a command to retrieve this path(in my case it is D:\Iceman
>> \Documents )
>> as the user could relocate this folder anywhere
>>
>> i have tried the System.getProporties() methord, but it has no key
>> value for documents
>> usually the documents folder is in <home dir>\Documents
> Just a guess, not sure if it will work. Property:user.home points to
> <home dir>. Concatenate the return string with "\Documents" to get:
> <home dir>\Documents. For example:
> String documentsDirectory=System.getProperty("user.home")
> +"\Documents";
>> but it could be relocated....
>>
>> in vista it can be relocated by
>> start -> rt click on documents -> loaction (tab)
>>
>> On Jun 13, 10:37 pm, Victor Ortiz <[email protected]> wrote:
>>
>>
>>
>> > Hi,
>>
>> > You can use the system properties included in java to retrieve the
>> > users default path.
>>
>> > Hope this answer your question.
>>
>> > Have a nice weekend
>>
>> > MfG / Mslts / Best regards
>>
>> > Ortiz Victor
>> > Flexcom
>>
>> > Le 11 juin 09 à 19:39, iceman <[email protected]> a écrit :
>>
>> > > in my project i need the current users documents folder
>> > > by default it is c:\users\<user name>\Documents
>> > > but this folder can be relocated ?
>> > > so, if it is relocated how can we retrive the path ??
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to