Browse to the target folder, select an icon resource, and run this script.
Code: Select all
"Iniconizer"
/*
select an icon resource in a folder, and run this script.
Desktop.ini will be created in that folder for that icon.
but sometimes the icon you want may reside in a subfolder
of the root. So if you call this script without selecting
anything, you get to choose another icon from subfolders.
*/
if ("<curitem>" != '') && (exists("<curitem>") != 2) {
$ico = getpathcomponent("<curitem>",file);
} else {
$ico = inputfile("<curpath>", /*"ico|exe|dll|icl|cpl"*/, "choose icon source");
$ico = resolvepath($ico,"<curpath>", 1); //make relative to <curpath>
}
//if (exists("<curpath>\desktop.ini") != 1){new("<curpath>\desktop.ini",file);}
setkey "$ico", "IconFile", ".ShellClassInfo", "<curpath>\desktop.ini",2;
setkey "0", "IconIndex",".ShellClassInfo", "<curpath>\desktop.ini",2;
attrstamp(h,1,"<curpath>\desktop.ini"); //desktop.ini hidden
attrstamp(r,1, "<curpath>\"); //folder must be readonly to show icon
//openwith "notepad", , "<curpath>\desktop.ini";
//uncomment above to open the ini after creationIt's very basic really, but it sets up the folder with a desktop.ini all right. You can always just edit the ini by hand.
XYplorer Beta Club