|
-
Oct 15th, 2005, 01:36 PM
#1
Thread Starter
No place like 127.0.0.1
[RESOLVED] Finding the relative path of file
I am starting a new thread on this because the last one I posted turned into a debate between randem and I.
I was wondering if anyone knew of a class module/DLL out there that finds the relative path of a file in a reliable manner. For example, I would pass these strings to a method:
"C:\Projects\My Project 1\Forms\MyForm.frm" <--- Path to make relative
"C:\Projects\My Project 1\" <--- Path to use as absolute
... should return ...
"\Forms\MyForm.frm"
Here is another example:
"C:\Common\By wossy\sandpaper.dll" <--- Path to make relative
"C:\Projects\My Project 1\" <--- Path to use as absolute
... should return ...
"..\..\Common\By wossy\sandpaper.dll"
There should also be another sub to unfold the relative paths. For example:
"D:\Another Guy\Coding Stuff\Project 132\" <--- Path to use as absolute
"\Forms\MyForm.frm"<--- Relative Path
... should return ...
"D:\Another Guy\Coding Stuff\Project 132\Forms\MyFrom.frm"
Does anyone know of a way to do this reliably? I have a feeling that if I wrote my own code to do it I would miss a few big things. This has to have been done before.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|