Re: How to get path to current directory?

From: Brad BARCLAY (bbarclay_at_jsyncmanager.org)
Date: 10/02/03


Date: Thu, 02 Oct 2003 17:50:09 GMT

Tomek wrote:
> Hello.
>
> How to get path to current directory and put this path to object of class
> String?
> I found FileSystemView.getHomeDirectory() but it returns path to home
> directory for example:
>
> C:\Documments and Settings\Thomas

        Posting your query once really was sufficient.

        To answer your question, try grabbing the "user.dir" property -- this
is the current working directory. To retreive this property, use
something akin to:

        String userDir = System.getProperty("user.dir");

        HTH!

Brad BARCLAY

-- 
=-=-=-=-=-=-=-=-=
 From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project:  http://www.jsyncmanager.org



Relevant Pages

  • Re: casting int as String
    ... > then i want the string to look like this ... From the OS/2 WARP v4.5 Desktop of Brad BARCLAY. ... The jSyncManager Project: http://www.jsyncmanager.org ...
    (comp.lang.java)
  • Re: casting int as String
    ... numerical digits in the int (ie, if list=12345, you want to append ... the matching Unicode value to your String (ie: ... From the OS/2 WARP v4.5 Desktop of Brad BARCLAY. ...
    (comp.lang.java)
  • Re: Can we use "*" to replace string in VBA excel macros ?
    ... The example I gave would produce where the string is found. ... isn't zero, you would copy. ... "Tomek" wrote in message ... > 1) If one string is in the begining of other string ...
    (microsoft.public.excel.programming)
  • Re: macro extracting text
    ... one of the string is the same as in A column. ... I hope it is clearer now. ... Thank you very much for your patience. ... Tomek ...
    (microsoft.public.excel.programming)