-
There are many programs out there that will let you colour a folder or apply a custom icon/background to it AFTER the folder has been created.
I'm looking for something that can do this on the fly, both from a right click context menu and a hotkey (like mdAxelerator for example).
So you could have it set to use a certain icon, background image, and comment and every new folder you create could look something like this:
[ You are not allowed to view attachments ]
If would have to:
1.) put a desktop.ini file in the newly created folder along with the icon and background image in a hidden folder. (This is useful when browsing such a folder holding images with a viewer that can't be set to avoid hidden files.)
2.) be able to use any combination of background image, icon, or comment as the template.
If you could add other templates and be able to select from them, that would be even better!
-
So, basically you're looking for a variation of Folder Tweaker?
http://qad.dcmembers.com/wp/category/freeware/folder-tweaker/
-
Not really. If I wanted that, I'd use this (http://www.sodabush.com/products/windowpaperxp/index.php).
I just want to create a new folder and have a default template instantly applied. This could be done be creating the folder and then applying the template, or by copying a folder already completed to the new location (much better).
-
;D Actually, I was using the WindowsPaper earlier to see how they structure the desktop.ini.
I understand what you mean "Folder Templates". Can do this in vbs but, tomorrow is a holiday here maybe by tomorrow night I'll have something.
-
Excellent! I'm interested to see how you would implement this.
-
Before I head out, here's some basics of it for people to play around with.
Desktop.ini Structure
[.ShellClassInfo]
ConfirmFileOp=0
InfoTip=This is a test of InfoTip.
IconFile=Antares_Favorites_Folder_Black.ico
IconIndex=0
[ExtShellFolderViews]
{BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098140-A513-11D0-A3A4-00C04FD706EC}
[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
ICONAREA_IMAGE=blkBgd.bmp
ICONAREA_TEXT=33023
Basic VBScript
Dim templateFldr 'Template Folder
Dim targetFldr 'TargetFldr
Dim nFldr 'New Folder
templateFldr="C:\Programming\Sandbox\Folder Templates\template1" 'Template
targetFldr="C:\Programming\Sandbox\" 'Target folder. Must have the back slash otherwise contents will be copied
nFldr=targetFldr&"template1" 'New Folder Template
Call copyFolder(templateFldr,targetFldr)
Function copyFolder(iFldr,oFldr)
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFolder iFldr,oFldr
Set oFldr=objFSO.GetFolder(nFldr)
oFldr.attributes=4 'Sets attribute of Folder to System in order for the desktop.ini to work
Set oFldr=nothing
Set objFSO=nothing
End Function
-
Okay, so I'm working on this in VBScript. Haven't actually written an AHK script yet, but hopefully can do this.
Here's a few questions, thoughts issues.
Copying a "Folder Template" is obviously easier and faster.
Let's say you have ten icons that you have five different backgrounds with each icon then you end up with 50 icons and 50 backgrounds instead of 10 icons and 5 background images.
So, basically you're wasting space & creating redundancy. For example I have four test template folders that already sit at 1.2mb and two don't even have backgrounds. I do realize these are full perhaps vista compliant icons but, not everyone wants to edit each icon down to the standard sizes.
IMO two separate ini files would save some space & present you with the option to vary icons, backgrounds, text colours, etc. while being efficient below are the two ini file structures. txt0, txt1,txt5,txt6,txt7 probably can be removed from the templates.ini
Just wanted to hear peoples thoughts on this.
[Template1]
icon=icon1
bgdimg=img1
resfldr=0 '1 for yes|0 for no
txt0=[.ShellClassInfo]
txt1=ConfirmFileOp=0
txt2=InfoTip=This is a test of InfoTip.
txt3=IconFile=Antares_Favorites_Folder_Black.ico
txt4=IconIndex=0
txt5=[ExtShellFolderViews]
txt6={BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098140-A513-11D0-A3A4-00C04FD706EC}
txt7=[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
txt8=ICONAREA_IMAGE=blkBgd.bmp
txt9=ICONAREA_TEXT=33023
[Icons]
icon1="C:\Path to my icons\icon.ico
[Backgrounds]
bgd1="C:\Path to my backgrounds\bgd.bmp
-
Well, you only need two types of INI I suppose, one for portable folders, and another for those wanting to keep everything in a local cache.
Size shouldn't really be relevant. Anyone who'd want to use this can probably make their own icons and decide what resolutions they want to include, or download packages made by others.
If you really wanted to be finicky and go for the most efficient way to produce results without bloat, then storing the folder images in PNG format would be the way to go. Finding a small PNG to ICO converter is simple. But this now you would have to build the icon and create the folder first before moving it to the new location.
I added up 50 folders, with background images and a max icon resolution of 64x64px and it was only about 3MB. 3MB is nothing today and most XP users would be happy with this anyway. I think speed and simplicity is the most important factor.
-
Actually one desktop.ini is fine if you're putting all the resources in that folder just use relative links like this:
[.ShellClassInfo]
ConfirmFileOp=0
InfoTip=This is a test of InfoTip.
IconFile=resources\Antares_Favorites_Folder_Silver.ico
IconIndex=0
[ExtShellFolderViews]
{BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098140-A513-11D0-A3A4-00C04FD706EC}
[{BE098140-A513-11D0-A3A4-00C04FD706EC}]
ICONAREA_IMAGE=resources\blkBgd.bmp
ICONAREA_TEXT=33023
Oh, and this is perhaps the quickest way. Take this code & save as a vbs file then place it into your sendto folder. Right click in sendto menu to run it. This should do until I or someone gets something better coded.
Dim WshShell, objFSO
Dim templateFldr 'Template Folder
Dim targetFldr 'TargetFldr
Dim nFldr 'New Folder
Dim nFldrname 'New Folder Name
'Path to the specific template folder
templateFldr="C:\Programming\Sandbox\Folder Templates\Templates\template2"
Set WshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
'Get the folder to work with
If WScript.Arguments.Count = 0 Then
WScript.Quit
ElseIf WScript.Arguments.Count = 1 Then
targetFldr = WScript.Arguments.Item(0)
targetFldr= objFSO.GetParentFolderName(targetFldr)&"\"
'targetFldr = objFSO.targetFldr&"\"
'--Input for New Folder Name
nFldrname=InputBox("Folder Template","Enter Name for New Folder","New Folder")
If nFldrname="" Then
WScript.Quit
Else
nFldr=targetFldr & nFldrname 'New Folder Template
'--Call the Copy Folder Function
Call copyFolder(templateFldr,nFldr)
End If
End If
Set objFSO = Nothing
Set WshShell = Nothing
Function copyFolder(iFldr,oFldr)
objFSO.CopyFolder iFldr,oFldr
Set oFldr=objFSO.GetFolder(nFldr)
oFldr.attributes=4 'Sets attribute of Folder to System in order for the desktop.ini to work
Set oFldr=nothing
Set objFSO=nothing
End Function