-1

I would like to define a virtual path that will be related to a physical path in windows .Net application (c#). In addition, the physical path will change according to the requirements.

f.e

Define a virtual path: c:\VirtualPath in code, and this path will be related each time to a different path - c:\AppName\1 or c:\AppName\2 etc.

Which functions need to use in order to do it?

Thanks

LosManos
  • 7,195
  • 6
  • 56
  • 107
DevApps
  • 1
  • 3
  • 2
    Possible duplicate of [Best way to get application folder path](https://stackoverflow.com/questions/6041332/best-way-to-get-application-folder-path) – Peter B Aug 13 '18 at 11:33
  • Making this obscure is not a good idea. Use Project > Properties > Settings or use a command line argument if the required path changes frequently. – Hans Passant Aug 13 '18 at 12:09
  • This is an [XY Problem](http://xyproblem.info). You need to ask about your problem rather than your proposed solution. – IInspectable Aug 13 '18 at 13:00

1 Answers1

0

(If I understand your question correctly it sounds more like a windows question than a c#/dotnet one.)

In Windows, you can use mklink to create virtual links. Also look at junction.

LosManos
  • 7,195
  • 6
  • 56
  • 107