Toribash
Original Post
Referencing a local file in a desktop.ini file?
Now my title may not be clear so I'll try explain this as best I can:

I have a set of custom folder icons which I've placed inside their respective folders, then gone into that folder's properties and selected the custom icon from underneath the "customize" tab. This works perfectly fine, and generates a desktop.ini file inside the folder that tells the folder to load its icon from a specific location.
The problem I have is that the folders are on an external drive, and as such if the drive's letter gets changed or if I plug it into a different computer the desktop.ini file won't load the icon as it won't be able to locate it.

So, what I want to do is change the line in the desktop.ini file so that it looks for and loads the icon from the folder it's currently sitting in rather than a specific directory under a drive.

The current desktop.ini file looks like this:
desktop.ini code:
[.ShellClassInfo]
IconResource=E:\Folder\foldericon.ico,0

Whereas I want it to be something along the lines of:
desired.ini code:
[.ShellClassInfo]
IconResource=LOCALFOLDER:\foldericon.ico,0


I know I've seen it done before in some game's .ini files where it checked for a certain file sitting in the same directory as it, but I can't for the life of me remember exactly what the line was for it. Something like ":\\file.txt" that lacked a drive letter, from memory.
Is this at all possible for the purposes I'm after?
Last edited by 4zb41; Mar 17, 2013 at 10:27 AM.
I'm not sure if this works, but "." usually corresponds to the current directory.
IconResource=./foldericon.ico,0
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
Originally Posted by Yoyo View Post
I'm not sure if this works, but "." usually corresponds to the current directory.
IconResource=./foldericon.ico,0

Thanks!
This lead me to the solution. I tried just removing everything but "=foldericon.ico,0" and that appears to work.

Closing, thanks again Yoyo.