PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Relative path to icon files on an external flashdrive?

Bjorn Keizers · 14 Jun 2004, 11:11 UTC
Since I don't know where else to post this, i'll just put it here if you don't mind.

I got a new USB flashdrive for my PC two days ago - a sony microvault 256 mb. I'm setting up folders on it, and to ... uh... make it look a bit more attractive, I'm setting custom icons for all the folders. I've stored all the icons on a hidden folder on the flashdrive.

Now my problem is: the drive is assigned E: on my system, but it's F: on the desktop, and K: on my school PC. Since the icons have an absolute path set, they disappear on another PC.

So, does anyone know if it's possible to set a relative path to icons, all on an external flashdrive?
Attachments:
Afbeelding3.jpg
Blade Runner · 14 Jun 2004, 11:44 UTC
Pocket Mechanic set every thing correctly.

And your icons are really cool, where did you get them?
Bjorn Keizers · 14 Jun 2004, 12:16 UTC
I got most of these from iconfactory.com. They look so good because they're 128x128 resolution instead of the usual 48x48. They're optimised for Mac OSX, but they do offer them in .ico, which you can use without any extra editing. I absolutely love them. The only downside is, they're much larger then regular icons: around 160kb!

Unfortunately, Pocket Mechanic isn't much use to me - it's not a storage card; it's an actual flashdrive with a USB plug.
If you have the permissions to do it, how about setting a system variable? I.e. set up a variable called ICONS and set it to k:\Icons and then put %ICONS%\myicon.ico in the icon path. If you don't have permissions to do it, you may be able to use the value of another system variable (store the icons in your %USERPROFILE%\Icons for example).

Or just have a script copy them to %TEMP% when you plug in your drive and use them from there. ;)
Real simple... just write a background program that copies them to the temporary directiory (%TEMP%) and set it in the autorun.inf, and set the paths to %TEMP%\icon.ico.



like he said.
Bjorn Keizers · 16 Jun 2004, 07:15 UTC
Refractor, Thanks, I'll try that and see how it works.

About scripts... that would be neat, but I'm no programmer.
In the autorun.inf , put:

[autorun]
open=xcopy /y /E icons %TEMP%


If that doesn't work (it should), then try:

In the autorun.inf , put:



[autorun]
open=copy.bat


Then in a file called copy.bat (amke sure that it has a batch icon not a text icon - if you save files with notepad it tends to happily add .txt for you), put:

xcopy /y /E icons %TEMP%


Which will copy the contents of the icons directory into the temp of the system.
Bjorn Keizers · 16 Jun 2004, 13:18 UTC
Works as promised! Now I can finally enjoy my icons away from my PC :-) Thanks guys.