c# - Check if file exists on remote server and various drive -


We have an ASPX page that needs to be checked whether the video file is present on our video server and if the file exists Then display the link. However, our videos are not stored on C Drive, but rather on D Drive.

I have tried

  System.IO.File.Exists (@ "http: //ourvideoserver/pcode/videofile_name.mp4") and System.IO.File .Exists (@ "\\ Our Viewer \\ D: \\ pcode \\ videofile_name.mp4")  

The last one was just taking a wild guess

And I can not figure out how to check files on a remote server than on a different drive.

How to check the remote server's D drive is the correct direction

in the UNC path , Drives are represented by a dollar that is, D $ try this:

  System.IO.File.Exists (@ "\\ Our viewer \ d $ \ pcode \ videofile_name.mp4" )  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Algorithm negotiation fail SSH in Jenkins -

java - Messages from .properties file do not display UTF-8 characters -