How to convert local path drive to UNC path
Hi
Is there is any way to convert the local path to UNC path in java.
For eg String s = F:\Test\Data\hello.xml
Here "Data" folder is shared folder and my pc name is ram-pc. so i want to convert the above url as follows.
\\ram-pc\Data\hello.xml
is that possible in java. Can anybody tell me how to convert local path to UNC path in java.
Thanks
kris
Re: How to convert local path drive to UNC path
Basic String concatenation should do just fine.
Change your \ to / and follow the UNC conventions.
Re: How to convert local path drive to UNC path
Hi,
Instead of using \ or / you can use File.separatorChar
Core java