Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. check file exist on different pc

check file exist on different pc

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kani98
    wrote on last edited by
    #1

    How should I specify the string to check if a file exists on a different pc? I have tried this string: "machineName\\C:\\Program Files\\MyFolder\\myFile.txt" and I get a NotSupportedException saying that the given path's format is not supported. I passed the above string into a new FileInfo instance. Any help would be appreciated.

    G P 2 Replies Last reply
    0
    • K kani98

      How should I specify the string to check if a file exists on a different pc? I have tried this string: "machineName\\C:\\Program Files\\MyFolder\\myFile.txt" and I get a NotSupportedException saying that the given path's format is not supported. I passed the above string into a new FileInfo instance. Any help would be appreciated.

      G Offline
      G Offline
      gnadeem
      wrote on last edited by
      #2

      hi, you dont need the colon ':' sign after "c" and your c drive must have been shard to use above path. try again after these checks plz.

      1 Reply Last reply
      0
      • K kani98

        How should I specify the string to check if a file exists on a different pc? I have tried this string: "machineName\\C:\\Program Files\\MyFolder\\myFile.txt" and I get a NotSupportedException saying that the given path's format is not supported. I passed the above string into a new FileInfo instance. Any help would be appreciated.

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        Assuming that you have the correct privileges on the other machine, you could always use \\machinename\c$\

        the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
        Deja View - the feeling that you've seen this post before.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups