Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to check if a path is on a server?

  Asked By: Vernon    Date: Jun 22    Category: Java    Views: 542
  

How can I check a path String to see if it is on a local machine(i.e.
C:\MyDir) or on a server (i.e. \\myServer\Stuff\MyDir)?? I noticed
that when you map a network drive it show up as something like:

Stuff on 'myServer'(E:)

In Winodws Explorer. So when I get a path String, it'll look
like "E:\blah". But I want to somehow figure out if that path is on
a network drive and if it is, I'll convert it
to "\\myServer\Stuff\blah".

I messed around before and got a URL object to spit out its name
(Stuff on 'myServer'(E:)).

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on How to check if a path is on a server? Or get search suggestion and latest updates.




Tagged: