Solved Bulk Change All Folder Icons in Single Folder or Folder Type

This was an old thread but may I ask Neutron16 if this bat file will safely work if the target folder (and its hundreds of subfolder icons you want changed to be same as the custom_icon folder) are located on an external USB HD rather than just on the computer's own internal C: drive? I looked at the code in "mass_icon_changer_custom_.bat" and didn't see anything scary, but then I'm not an experienced .bat file author....
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Latitude e6500
OS
62 bit Windows 7
Browser
Firefox
Thanks Neutron16!

I know this was posted 8 years ago but it was still helpful for me. Thank you!
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 10 64
Thank you so much!:D
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Windows 8.1 Single Language Build 9600 64 bit
Thanks a lot.

- - - Updated - - -

Wonderful script! Saved me 43.000 folder-job...

Just one question: is it possible to run the script to copy "to only one (or two) level sub-folders"?

Regards.


First, a little bit of theory. What happens when a person sets a custom icon for a folder in Windows 7?
1. Attributes of a Folder change to Read-only (of the folder, NOT content!).
2. A hidden system file created inside that folder, which contains a link to the icon.

Thus, having such file as model, it is possible simply copy it across desired folders, and change attributes of those folders correspondingly.

Secondly, having this idea in my mind, I have put all of my little knowledge of Batch files together and created a script.
BEFORE script is started the following is needed to be done:
Master folder needs to be selected and a custom icon applied to it.

ONLY AFTER THAT
1. Script is placed inside that master folder and launched.
2. First, script checks if hidden system file with custom icon settings is there.
3. Secondly, script looks for subfolders and start changing its attributes.
4. Thirdly, script copies this settings file to all subfolders of current master folder, including all levels of subfolders.


For 100 folders it took about 21 seconds, for 200 folders with different levels of subfolders it took about 57 seconds on my laptop.

I have included remarks (comments) in the source code for better understanding what is going on.

UPDATE: Original file deleted. Script was not meant to be applied to system folders.
Please check a newer FIXED version at this post.

PLEASE READ NEW INSTRUCTION IN THAT POST.
 

My Computers My Computers

System One System Two

  • OS
    Win7
  • Computer type
    PC/Desktop
Back
Top