Tom's Hardware > Forum > Applications > Programming > MS file path basics?

MS file path basics?

Forum Applications : Programming - MS file path basics?

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Dear All,

I wrote in BASIC 25 years ago and...that's about it when it comes to programming. Can anyone provide a link or reference a simple file path rule book online?

My problem is that I use an USB MP3 player as a hardrive between work and home and it works fine for the most part, the PC just assigns it a drive. Once in a while I need to reference a certain file on my Personal Info Managaer (to do's, contacts, etc,)

I want to type the file path as a relative one so that it knows to just go to the file, no matter what drive it is on. A relative path. I have looked this up for many minutes now and all I can find is use a "." at the start of the path, or URL relative file paths. I just can't seem to get it to work.

I see %\folder\file, $\folder\file and all sorts of things, but I am just looking for a basic rule book to figure it out.

Any thoughts welcome. (Yes this is a basic question, you can laugh, but don't point.)

zoo

Sponsored Links
Register or log in to remove.

A relative path is 'relative' to the current working directory of whatever is being executed.

It 'may' always be different.

You could set a System/User Variable, ala the internal DOS 'SET' command, and use something like %YourVar%\dir\subdir\subdir\file.ext

It may require double \\, and/or even double %% depending on the language used.

Could also try @"%YourVar%\dir\subdir\subdir\file.ext" or similar.

------------------------------ Averaging 7 points per post, since err, I re-joined this mess.
Reply to Scott2009
Tom's Hardware > Forum > Applications > Programming > MS file path basics?
Go to:

There are 1183 identified and unidentified users. To see the list of identified users, Click here.

Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them
  • 01:00 vianescute won the Freshman badge
  • 01:00 meywd won the Freshman badge
  • 01:00 nayega won the Freshman badge
  • 01:00 gpfear won the Freshman badge
  • 01:00 Conrad925 won the Freshman badge
  • 01:00 skythra won the Freshman badge
  • 01:00 Ckaz won the Freshman badge
  • 01:00 james59 won the Uniformed badge
  • 01:00 snarl won the Uniformed badge
  • 01:00 patlabor44 won the Uniformed badge