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
  1. Home
  2. General Programming
  3. C#
  4. store file location

store file location

Scheduled Pinned Locked Moved C#
csharplinuxquestion
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
    Kim0618
    wrote on last edited by
    #1

    Hi, I want to store the location of a file in C# program, but the file may be moved into another location. So besides using the File System Watcher, can I store other information of the file instead of the location, so that the shell or window can recognize the file by the stored info and give me the new location information ? Thanks

    E R 2 Replies Last reply
    0
    • K Kim0618

      Hi, I want to store the location of a file in C# program, but the file may be moved into another location. So besides using the File System Watcher, can I store other information of the file instead of the location, so that the shell or window can recognize the file by the stored info and give me the new location information ? Thanks

      E Offline
      E Offline
      ednrgc
      wrote on last edited by
      #2

      I'm not sure exactly what you are asking. Do you mean you want dynamic info for your program that's not hard coded? If so, use app.config. If that's not what you mean, please clarify it for me. :confused:

      1 Reply Last reply
      0
      • K Kim0618

        Hi, I want to store the location of a file in C# program, but the file may be moved into another location. So besides using the File System Watcher, can I store other information of the file instead of the location, so that the shell or window can recognize the file by the stored info and give me the new location information ? Thanks

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #3

        AFAIK no, since files (on FAT and NTFS) are identified by their fully qualified name. Methinks you're better off storing information such as this in the registry. /ravi

        My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

        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