You are here

Linking to html page on usbdrive without using drive letter..

21 posts / 0 new
Last post
gambituk
Offline
Last seen: 14 years 9 months ago
Joined: 2010-03-24 10:41
Linking to html page on usbdrive without using drive letter..

Hi, just wondered if anyone knew how to link to a file within the firefoxportable folder without including the drive letter, ie, i want to create a homepage of links that can be moved from device to device without having to change the html link?

ie file://?????

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 55 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Just Do It

Like most stuff in our apps, the magic is already baked in. Just set it and it'll work.

Sometimes, the impossible can become possible, if you're awesome!

gambituk
Offline
Last seen: 14 years 9 months ago
Joined: 2010-03-24 10:41
well i cant get the right link.

well i cant get the right link format, if i open file and then set it as homepage, it ends up with file://f:/firefoxportable/linkpage.html but if i then move the folder to another drive or to a pc the links will no longer work. i know its should be possible to do a relative link ie something like file://linkpage or something, but i just cant make it work, sorry if this is a dumb question, but it would really help with the work i do.

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 7 months ago
Joined: 2008-04-14 09:41
Online?

Why not just put it online somewhere? Is it just a simple HTML page, nothing fancy? I do almost exactly the same thing except that I've uploaded my homepage to Freewebs.com. Any free host will do if all you need is a simple HTML page.

Now I can access my shortcuts page where ever there's Internet access, even if I don't have my USB drive with me.

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 2 months ago
Developer
Joined: 2010-02-13 17:10
Igoogle

OK first I am NOT suggesting any sight over a nother, that being said this is what I did/do

I use Google and have a My Google iGoogle page. I have a spot on it where I can add bookmarks. This is accessible by me from anywhere when I log onto my page.

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 55 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Don't Move It

You can't move directories. Just drive letter changes. The PA.c launcher in Firefox Portable will update the drive letter as you move your drive around. But you can't just take the folder and move it to a different path. This applies to most apps.

Sometimes, the impossible can become possible, if you're awesome!

gambituk
Offline
Last seen: 14 years 9 months ago
Joined: 2010-03-24 10:41
Thanks for the suggestions so far.. but :S

ok, so more info, good suggestions so far, but it doesnt totally fit my problem, some of the files i also link to are pdf part manuals, plus other things that i cannot post on the internet for security reasons, and other times i need to work on non internet connected machines. the moving the folder has never been an issue, your firefox portable has worked for me in this manner since soon after your released the first couple of candidates..

all i need to do is link to these items. if there's no known way to do this, its not a problem, but if you have any more idea's, i'd love to hear them.

Thanks again to all

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 55 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Define "LINK TO"

Define LINK TO. If you just want a file as your homepage, just open it up in Firefox Portable and then set it as your homepage. As you move your device between PCs, the Firefox Portable launcher will change the drive letter for you, as long as Firefox Portable and the file you are setting as your homepage are on the same drive.

As already stated, this does not apply to randomly changing Firefox Portable's path, though, so you can't move FirefoxPortable itself around.

Sometimes, the impossible can become possible, if you're awesome!

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
I think he wants the links on

I think he wants the links on the html page to update as well. . . . .

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 55 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Relative

In that case, make all the links in your page relative. Just the file name (like a href="example.pdf") if they are in the same directory.

Sometimes, the impossible can become possible, if you're awesome!

guillaume.prevot
Offline
Last seen: 7 years 5 months ago
Joined: 2009-07-29 13:54
Moving issue

Hi John,

Are you saying that moving from "D:\Guillaume\PortableApps" to "E:\Guillaume\PortableApps" will work fine but not to "E:\PortableApps" ?

I'm sorry if I misunderstood you but it turned a light on in my head because I planned to install it on my harddrive by now and move it to my flashdrive when I go on vacation.

I hope both cases are OK. If not, Why are you updating only the drive instead of the root path ? In the previous example, replacing "D:\Guillaume" by "E:" should work, right ?

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
Are you saying that moving

Are you saying that moving from "D:\Guillaume\PortableApps" to "E:\Guillaume\PortableApps" will work fine but not to "E:\PortableApps" ?

Exactly what he is saying.

As for why, the launchers can handle one or the other. Take your pick Smile

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

guillaume.prevot
Offline
Last seen: 7 years 5 months ago
Joined: 2009-07-29 13:54
Fine but...

Thank you for your (very fast) answer Smile

Is it planned to change the way the launcher deals with path/drive ? I mean, it looks like PAL will save LastDrive to replace it in config files the next time it will start.

My first question is : why PAL doesn't save "LastPath" instead of "LastDrive" ? Indeed, LastDrive is a particular case while LastDrive deals with all cases, right ?

My second question would be : if I want to change the path for my PortableApps, would I need to reinstall and reconfigure everything ?

Thank you for your help on this Smile

Edit: Should I create a new entry in forums ?

OliverK
OliverK's picture
Offline
Last seen: 3 years 6 months ago
Developer
Joined: 2007-03-27 15:21
Thank you for your (very

Thank you for your (very fast) answer Smiling

you're welcome.

Is it planned to change the way the launcher deals with path/drive ? I mean, it looks like PAL will save LastDrive to replace it in config files the next time it will start.

My first question is : why PAL doesn't save "LastPath" instead of "LastDrive" ? Indeed, LastDrive is a particular case while LastDrive deals with all cases, right ?

As far as PAL goes, I know nothing. I hand code my launchers.

My second question would be : if I want to change the path for my PortableApps, would I need to reinstall and reconfigure everything ?

You won't need to reinstall, but you might need to reconfigure everything. I'd suggest making a PortableApps folder at the root of the C:\ drive.

Thank you for your help on this Smiling

No prob

Edit: Should I create a new entry in forums ?

Don't see why . . . .

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

guillaume.prevot
Offline
Last seen: 7 years 5 months ago
Joined: 2009-07-29 13:54
Thank you

I didn't think about your launchers only but about platform features. Installation is not a big deal but configuration is. That's the whole interest of portable apps !

That's also why I proposed to create a new thread (it's not about Portable Firefox but it's more like a feature request).

alanbcohen
Offline
Last seen: 5 years 4 months ago
Joined: 2006-01-04 10:47
TiddlyWiki

I use a TiddlyWiki (tiddlywiki.com) as a USB homepage. There are a number of resources, including http://twhelp.tiddlyspot.com/ and a very user-friendly Google Group to help get you started.
I have links to other local files including html, pdf, and various other formats. You can use relative addressing to link to other material on the same usbdrive. In addition, I also have links to on-line content.

gambituk
Offline
Last seen: 14 years 9 months ago
Joined: 2010-03-24 10:41
Relative links..

Hi alanbcohen, This is what i'm looking for, if you could show me an example of a relative link that u have used on the same drive, i would be very appreciative..

Thanks

Gambituk

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 7 months ago
Joined: 2008-04-14 09:41
relative to the HTML file

Relative links specify the path to a file relative to the HTML file itself...

So if you open the HTML file in your browser with a path of something like:
file:///X:/MyStuff/Homepage/MyHTML.html

and you have a file that lives in
X:/MyStuff/PDFs/MyPDF.pdf

Then you have to specify the link as something like:
../PDFs/MyPDF.pdf

The two dots ("..") so, go up one directory level, i.e. go to the parent directory of "Homepage" which is "MyStuff". Now from "MyStuff" we have to go to "PDFs" and that is where we will find the file.

We you create an anchor link in HTML you can specify the source of the link to be either absolute:
X:/MyStuff/PDFs/MyPDF.pdf
or relative:
../PDFs/MyPDF.pdf

Notice that with the relative link we don't care what the drive letter is.

Does this help?

Jimbo
Offline
Last seen: 4 years 10 months ago
Joined: 2007-12-17 05:43
same format as on a web served page

so, say you had a structure such as

Documents\
Documents\start\
Documents\start\start.html
Documents\start\anotherPage.html
Documents\start\subFolder\subPage.html
Documents\Manuals\aFile.pdf
Documents\Notes.html

then the code inside start.html could look like

<a href="anotherPage.html">Another Page</a>
<a href="../Manuals/aFile.pdf">A PDF Manual</a>
<a href="../Notes.html">Notes</a>
<a href="subFolder/subPage.html">Page in a sub folder</a>

Hopefully that should be examples of most of the cases you need for relative pathing.

Use "../" to go back up one level, and don't specify ANYTHING for the protocol - if you go "file:" or "http:" then you're stuffed, they'll always be absolute locations.

Hope that helps

gambituk
Offline
Last seen: 14 years 9 months ago
Joined: 2010-03-24 10:41
Perfect.

Exactly what i was looking for. thanks for all the help. Great apps, thanks for the help.

chris50
Offline
Last seen: 2 months 3 weeks ago
Joined: 2024-09-07 12:30
To link to an HTML page on a

To link to an HTML page on a USB drive without using a drive letter, you can use relative paths if you’re working within a web environment or specify the path using a URL scheme like file:///.

For a relative path, you might use something like:

html

Open File

If you’re writing HTML code that will be used directly on the USB drive, you might refer to the file like this:

html

Open File

Just make sure the HTML file and any referenced files are in the same directory or adjust the path accordingly.

Log in or register to post comments