0

In Vb.Net is there any way to "tag" a file so if I was to change its location my program could still find it, without the user having to search for it? I am using:

If Not System.IO.File.Exists(C:\Location\Folder\FileName.txt) Then System.IO.File.Create(C:\Location\Folder\FileName.txt)

1 Answers1

0

If it is the program that is changing the location of the file, then you could store the current location in the registry, in the app's config file, in a database, or in a plain text file in a known directory near the application.

I generally store this information in the registry or a database (assuming the application uses one) since this will survive uninstall and reinstall events.

competent_tech
  • 44,465
  • 11
  • 90
  • 113