You are here

Strange Question (Revised)

19 posts / 0 new
Last post
dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
Strange Question (Revised)

"How do you assign icons to folders? Understand, I'm not talking about drive icons I'm talking about folders in the drive itself while not messing with the file registry or any thing inside the host computer and of course being portable. I was thinking an INF file in the folder but it didn't work."

Above is the original Post. I decided I should leave a clear tutorial after I found out some things about writing ".ini" files that: first, don't appear in this forum discussion below and second, provide some answers to some potential FAQ's; also someone might need this one day and searching throughout the the posts is to say the least-- irritating (especially when a post is long and mostly unrelated). So because you will have to search anyway here's some help.

Step by Step Portable Icons:

STEP 1:Turn your folder into a system folder by going to MS-DOS or better yet Command Prompt and type (sample):

attrib +s X:\folder\folder\
    "attrib," or, change attribute-- is the command

    "+s" is the syntax, meaning with "attrib" ...change to system file.

    "X:\folder\folder", file directory, remember this a sample, when you type this, type in the path to YOUR folder.

STEP 2: Open Notepad or Word Pad and write this in it (Sample):

[.ShellClassInfo] 
ConfirmFileOp=0 
InfoTip=:PRIVATE:
IconFile=..\..\Icons\Private.ico
IconIndex=0
    "[.ShellClassInfo]", describes the file.

    "ConfirmFileOp=0", you must put zero, tells the computer to not give a system file warning if the file is deleted or moved because to make this work the folder has to be defined as a system file.

    "InfoTip=", Creates a custom file description.

    "IconFile=", Set to the file path of the icon you are using, mine is called "Private.ico". Don't forget to use "../../" instead of a drive letter to make it portable.

    "IconIndex=" this is if you are using a ".dll" file, I don't know how that works so put zero after the equal sign and use one ".ico" file (or read the rest of this post).

STEP 3:Saving your ".ini" this part is more important than in step one in making this work. Choose "Save As". Then in the "File Name" box type "Desktop.ini,"(erase the .*txt) in the "Save As Type" box choose "All Files" and finally, choose "ANSI," or "Unicode" as your encoding and click "Save".

STEP 4: If your icons don't show up immediately after step 3, check the steps to make sure you did it right and check your USB stick or Portable Hard Drive to make sure your files are written and saved correctly. If that doesn't work see the sources I got it from. Otherwise enjoy your Icons.

Sources:

MICROSOFT DEVELOPER NETWORK
"Customizing Folders with Desktop.ini"
COMPUTER HOPE
"Microsoft DOS attrib command"
Patrick Patience
Offline
Last seen: 4 years 6 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Close

And INI. To to Explorer and click on Tools - Folder Options - View and check 'Show hidden files and folders' and then go look the documents folder of the PortableApps.com Suite.

dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
I need a little more advice.

Is seems dependent on the portable apps base what if your not using the PAM or any apps. I did what you said by downloading the menu and then... but after deleting the menu base but keeping the .ini files it ceased to work even when I changed the written directories to my own icons like I want. Maybe the INIs in question are not apropreate for what I want to do, any tips on INI writing?

self.path = path if self.path == None else self.path

Patrick Patience
Offline
Last seen: 4 years 6 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
All in the File

All you need is all in the file, unless you're using an icon DLL. Just simple change that path to a path on your PC. That one only uses '..' to indicate up a directory.

So just pop in the path to your icon, and place it in any folder.

grannyGeek
Offline
Last seen: 16 years 1 day ago
Joined: 2007-03-14 23:42
I think you are looking for a Desktop.ini to do the job

I have folders inside my main programs folder on my portable drive with custom icons. The ini file looks like this:

[.ShellClassInfo]
IconFile=..\__00Qsel\icons\red.ico
IconIndex=0

or, if you are using a dll file, it would look like this:

[.ShellClassInfo]
IconFile=..\__00Qsel\Icons\obliQue_icons.dll
IconIndex=17

Name it Desktop.ini, and put it inside the folder you want to have the new icon.

Works for me, hope it works for you. Just remember to use the dot or double-dot to indicate directory --- you can't hard-code the drive letter in there, because when you move to another pc, if the drive letter changes, the ini won't be able to find the path anymore.

PS added:
the easiest way to get your ini started is to right-click the folder icon, go to Properties >> Customize >> Change Icon. Browse to and select the standalone icon or the icon in the dll, and Apply.
That creates a Desktop.ini inside the folder, and you should edit it --- replace the drive letter and extraneous directories with the double dots to make the path relative.

Did that make sense ??

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 2 weeks 6 days ago
Joined: 2006-11-18 10:26
Makes total sense to me

Makes total sense to me. Only thing I'd add is you need to make the path relative to the folder you'd like to change the icon on using a single period to indicate "this folder" and a double period to indicate "one folder higher up in the directory structure".

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
Ok good news is....

...it worked. Thanks everybody!!!!!!!!!

(P.S. Did anyone read "Portable Linux p.2")

self.path = path if self.path == None else self.path

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 2 weeks 6 days ago
Joined: 2006-11-18 10:26
Read what? (as an ...do you

Read what? (as in ...do you have a link or something like a description without throwing random stuff out there?)

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
OK

https://portableapps.com/node/10926

[Duplicate comment deleted by moderator PP]

self.path = path if self.path == None else self.path

sergentsiler
sergentsiler's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2007-02-28 11:37
...

well yah, "Desktop.ini" controlls everything, but if you have Win2K Pro, it is a lot easier than that. simply enter the folder, go to the tools menu, and customize the folder. i have some folders on my PAM drive set to display a photo in my pics folder as the backround!

(**Edit** sorry about having the comment all the way down here!)

Zoop

Patrick Patience
Offline
Last seen: 4 years 6 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Not just 2000

XP, Vista, they all have that option.

grannyGeek
Offline
Last seen: 16 years 1 day ago
Joined: 2007-03-14 23:42
Do you mean "View" menu, then "Customize this folder"?

NOT "Tools" menu, that will send users on wild-goose chase.

I'm at work now, using XP Pro, and even on a pc with Admin rights, I don't see anything for changing background/wallpaper of a folder.
Only an option to set a picture for Thumbnails view.

However, these machines have lots of policy restrictions, so it could just be here, and I don't remember if I have this option at home. Without admin rights, we can't even apply a custom icon.
Sad

You can for sure add a folder wallpaper in XP by using Desktop.ini

[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
IconArea_Image=C:\My Documents\My Pictures\thisPic.bmp

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 2 weeks 6 days ago
Joined: 2006-11-18 10:26
Good guidance above

The directions grannyGeek gave above in the "PS added" section are spot-on correct for WinXP SP2 and the easiest way to change a folder icon for that OS.

(Intra-Node Linking® royalty fee paid to Tim Clark. Check is in the mail. Smile )

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

roamer
roamer's picture
Offline
Last seen: 14 years 7 months ago
Joined: 2007-02-21 16:01
haha!

You misspelled the title! it's construction. Just an FYI...

OliverK> you don't live on a cow
IRC: It brings out the best in all of us...Especially when tired.

dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
OK

The tutorial is done.

self.path = path if self.path == None else self.path

Patrick Patience
Offline
Last seen: 4 years 6 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Please

Remove the links you used to create the red font. It's unnecessary, and bold or italic will work just as well.

dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
? :o

I get what you are saying, but it helps organize the document. I changed my mind.

self.path = path if self.path == None else self.path

Patrick Patience
Offline
Last seen: 4 years 6 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Thanks

Yea, the pre-formatted text works fine, too.

Thanks.

dark_yux
Offline
Last seen: 10 years 5 months ago
Joined: 2007-10-23 11:23
OK

Smile

self.path = path if self.path == None else self.path

Log in or register to post comments