Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 05, 2016, 02:33:32 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Create New (Customized) Folder Wanted  (Read 6660 times)

Nighted

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 572
  • Meat Popsicle
    • View Profile
    • Nighted@deviantART
    • Donate to Member
Create New (Customized) Folder Wanted
« on: October 03, 2007, 10:39:46 PM »
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:

Capture-074.png

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!
I`m a firm believer in the philosophy of a ruling class, especially since I rule.

SirSmiley

  • Member
  • Joined in 2007
  • **
  • Posts: 64
    • View Profile
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #1 on: October 06, 2007, 09:35:58 PM »
So, basically you're looking for a variation of Folder Tweaker?
http://qad.dcmembers...ware/folder-tweaker/

Nighted

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 572
  • Meat Popsicle
    • View Profile
    • Nighted@deviantART
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #2 on: October 06, 2007, 10:10:27 PM »
Not really. If I wanted that, I'd use this.

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).
I`m a firm believer in the philosophy of a ruling class, especially since I rule.

SirSmiley

  • Member
  • Joined in 2007
  • **
  • Posts: 64
    • View Profile
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #3 on: October 07, 2007, 01:05:35 AM »
 ;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.

Nighted

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 572
  • Meat Popsicle
    • View Profile
    • Nighted@deviantART
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #4 on: October 07, 2007, 05:30:23 AM »
Excellent! I'm interested to see how you would implement this.
I`m a firm believer in the philosophy of a ruling class, especially since I rule.

SirSmiley

  • Member
  • Joined in 2007
  • **
  • Posts: 64
    • View Profile
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #5 on: October 07, 2007, 11:37:55 AM »
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
Code: Visual Basic [Select]
  1. Dim templateFldr        'Template Folder
  2. Dim targetFldr          'TargetFldr
  3. Dim nFldr                       'New Folder    
  4. templateFldr="C:\Programming\Sandbox\Folder Templates\template1"        'Template
  5. targetFldr="C:\Programming\Sandbox\"    'Target folder. Must have the back slash otherwise contents will be copied
  6. nFldr=targetFldr&"template1"    'New Folder Template
  7.  
  8. Call copyFolder(templateFldr,targetFldr)
  9.  
  10. Function copyFolder(iFldr,oFldr)
  11.    Set objFSO = CreateObject("Scripting.FileSystemObject")
  12.    objFSO.CopyFolder iFldr,oFldr
  13.    Set oFldr=objFSO.GetFolder(nFldr)
  14.    oFldr.attributes=4   'Sets attribute of Folder to System in order for the desktop.ini to work
  15.   Set oFldr=nothing
  16.    Set objFSO=nothing
  17. End Function

SirSmiley

  • Member
  • Joined in 2007
  • **
  • Posts: 64
    • View Profile
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #6 on: October 08, 2007, 12:43:44 PM »
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


Nighted

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 572
  • Meat Popsicle
    • View Profile
    • Nighted@deviantART
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #7 on: October 08, 2007, 07:28:17 PM »
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.
I`m a firm believer in the philosophy of a ruling class, especially since I rule.

SirSmiley

  • Member
  • Joined in 2007
  • **
  • Posts: 64
    • View Profile
    • Donate to Member
Re: Create New (Customized) Folder Wanted
« Reply #8 on: October 08, 2007, 10:11:41 PM »
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.

Code: Visual Basic [Select]
  1. Dim WshShell, objFSO
  2. Dim templateFldr        'Template Folder
  3. Dim targetFldr          'TargetFldr
  4. Dim nFldr                       'New Folder    
  5. Dim nFldrname           'New Folder Name
  6.  
  7. 'Path to the specific template folder
  8. templateFldr="C:\Programming\Sandbox\Folder Templates\Templates\template2"
  9.  
  10. Set WshShell = CreateObject("WScript.Shell")
  11. Set objFSO = CreateObject("Scripting.FileSystemObject")
  12.  
  13. On Error Resume Next
  14.  
  15. 'Get the folder to work with
  16. If WScript.Arguments.Count = 0 Then
  17.         WScript.Quit
  18. ElseIf WScript.Arguments.Count = 1 Then
  19.         targetFldr = WScript.Arguments.Item(0)
  20.         targetFldr= objFSO.GetParentFolderName(targetFldr)&"\"
  21.         'targetFldr = objFSO.targetFldr&"\"
  22.         '--Input for New Folder Name
  23.          nFldrname=InputBox("Folder Template","Enter Name for New Folder","New Folder")
  24.                 If nFldrname="" Then
  25.                         WScript.Quit
  26.                 Else
  27.                         nFldr=targetFldr & nFldrname    'New Folder Template
  28.                         '--Call the Copy Folder Function
  29.                         Call copyFolder(templateFldr,nFldr)
  30.                  End If
  31. End If
  32.  
  33. Set objFSO = Nothing
  34. Set WshShell = Nothing
  35.  
  36. Function copyFolder(iFldr,oFldr)
  37.    objFSO.CopyFolder iFldr,oFldr
  38.    Set oFldr=objFSO.GetFolder(nFldr)
  39.    oFldr.attributes=4   'Sets attribute of Folder to System in order for the desktop.ini to work
  40.   Set oFldr=nothing
  41.    Set objFSO=nothing
  42. End Function