0

For years I've put my application data files in c:\MyCompany\MyDataFileFolder\App where 'App' is my application name. I made this choice in the early days of Wild-West-Windows when Microsoft seemed to keep changing its own mind (My Documents, Documents, Program Data etc). As I've learnt more about how to do things correctly, and as Windows has now 'settled down' and is more picky about permissions I'd like to move my files. Users have got used to where they are though, and what I'd really like to do is to implement something like Windows does with 'special folders' where there are several synonymous names, thus in my legacy folder I'd like to put something in (or change a folder to) an alias for the real location which will now be something descended from Program Data. This way, the files are in a good place with the correct permissions and if we run a utility expecting or modifying files in the 'old' place this gets changed transparently to the 'new' place (thus a simple shortcut wont work).

Is this possible? Is there are recognised technique for this? I'm using Delphi XE2.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
  • 3
    If you want to keep something at `c:\MyCompany` then what's to be gained from changing at all. Having the thing at `c:\MyCompany` be an alias will just make things even more untidy. Either stick to what you have or move lock stock and barrel to the recommended file locations. – David Heffernan Mar 12 '12 at 16:22
  • 3
    There are no techniques that I can unhesitatingly recommend, however if you insist on doing something that you think will make life easier, but which will actually just introduce lots of fun difficulties, try using NTFS Symlinks: http://en.wikipedia.org/wiki/NTFS_symbolic_link – Warren P Mar 12 '12 at 16:55
  • @Warren +1 for lots of fun difficulties. – Brian Frost Mar 12 '12 at 17:21
  • @David I know you are right. I just wanted to explore my possibilities. – Brian Frost Mar 12 '12 at 17:22
  • This is what README files (that no customer actually READs) are for! – Warren P Mar 12 '12 at 17:30
  • You know, all that stuff "settled down" over 10 years ago. Better late than never, I suppose. – Rob Kennedy Mar 12 '12 at 21:02

1 Answers1

1

What you are looking for is either a Symbolic Link or a Reparse Point.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770