The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> USB drive drive letter as a variable
goldenyears
post Mar 26 2014, 07:29 PM
Post #1





Group: Members
Posts: 1
Joined: 26-March 14
Member No.: 20,619



Background: I have some html pages I've created on a USB portable drive interchangeable between two different computers. The page contains links to files and folders on the USB drive. One of the computers has multiple internal drives and the other just one, so the USB drive gets assigned different drive letters. Because the USB drive gets assigned different letters on each machine I have to use the SUBST statement in a DOS batch file at startup. But sometimes I plug the USB drive into someone else's computer and the drive letters are incorrect for their machine. Here's some examples of the links in the HTML page:

<A HREF="file:///G:/HOUSEHOLD/">Household</A>
<A HREF="file:///G:/HOUSEHOLD/Computer/DellUserGuide.pdf">Monitor</A>

Question: is there a way for the hrml page to make the drive letter a variable which is assigned depending on which computer it is attached to? If not automatically, then by asking for the drive letter to use on the page itself?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 26 2014, 08:29 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



Can't you just use relative URLs?

HTML can't use variables. You might do it with e.g. PHP (not sure), but then you also need a local server.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 02:32 AM