AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

kiu folder Lab: create folder with lots of possibilities

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
kiu



Joined: 18 Dec 2005
Posts: 229
Location: Italy - Galatro(RC)

PostPosted: Tue Apr 25, 2006 10:24 pm    Post subject: kiu folder Lab: create folder with lots of possibilities Reply with quote

This script helps you create groups of folder: usefull in many ways

As always please send feedback

Code:
/*
   Author:
      Salvatore Agostino Romeo
   E-Mail:
      romeo84@gmail.com
   Description:
      This program will let you create folders by specifying prefix or postfix,
      date, numbers, hour, etc.
   Version:
      0.5
   License:
      GPL
   Note:
      SubProject of AHKxplorer
   ToDo:
      ?
   Bugs:
      ?
      
*/

Menu, new, add, File, new
Menu, new, add, Folder, new
Menu, folderCreate, add, Simple Folder, folderCreate
Menu, folderCreate, add, Folder Structure(Numbers), folderCreate
Menu, folderCreate, add, Folder Structure(Alphabet), folderCreate
Menu, folderCreate, add, Folder with day , folderCreate
Menu, folderCreate, add, Folder with hour, folderCreate
Menu, folderCreate, add, Folder with day and hour, folderCreate
Menu, folderCreate, add, Folder with month and day, folderCreate
Menu, folderCreate, add, Folder with date, folderCreate
Menu, folderCreate, add, Folder with date and hour, folderCreate
alphabet=abcdefghijklmnopqrstuvwxyz

Gui, Add, Edit, x6 y35 w190 h20 vselectedFolder, %A_Desktop%
Gui, Add, Button, x206 y35 w20 h20 gBtnSelFolder, ...
Gui, Add, Text, x6 y5 w220 h30, Select a folder(where to create folder structure) or drag it here
Gui, Add, Button, x200 y5, Go
Gui, +AlwaysOnTop +ToolWindow
Gui, Show, x50 y30 ,FolderLab - romeosa.com
Return

BtnSelFolder:
   FileSelectFolder, tempfolder, , , Select the folder to print
   GuiControl, , selectedFolder, %tempfolder%
return
GuiDropFiles:
   GuiControl, , selectedFolder, %A_GuiControlEvent%
return
Esc::
GuiClose:
ExitApp
return

ButtonGo:
   Gui, submit, nohide
   tempfolder:= selectedFolder
   Menu, new, show
return

new:
   if ( A_ThisMenuItemPos = 1)
      {
         InputBox, filename, File Name, Insert the name for the file.`nInclude an extension if you want
         FileAppend,,%tempFolder%\%filename%      
      }
   else
      Menu, folderCreate, show
return

folderCreate:
   if ( A_ThisMenuItemPos = 1)
      {
         InputBox, filename, File Name, Insert the name for the folder
         FileCreateDir,%tempFolder%\%filename%   
      }
   else if ( A_ThisMenuItemPos = 2)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         InputBox, startFrom, Start from..., Insert the number from wich you want to start,,,,,,,0
         InputBox, howmany, Start from..., Insert how many folder you want to create
         if (howmany="")
            return
         Loop, %howmany%
            {
               index := startFrom + A_Index -1
               filename=%prefix%%index%%postfix%
               FileCreateDir,%tempFolder%\%filename%
            }
      }
   else if ( A_ThisMenuItemPos = 3)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         StringSplit, a, alphabet
         Loop, %a0%
         {
            char := a%A_Index%
            filename=%prefix%%char%%postfix%
            FileCreateDir,%tempFolder%\%filename%
         }
      }
   else  if ( A_ThisMenuItemPos = 4)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         filename=%prefix%%A_DDDD%%postfix%
         FileCreateDir,%tempFolder%\%filename%
      }
   else  if ( A_ThisMenuItemPos = 5)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         filename=%prefix%%A_Hour%`,%A_Min%%postfix%
         FileCreateDir,%tempFolder%\%filename%
      }
   else  if ( A_ThisMenuItemPos = 6)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         filename=%prefix%%A_DDDD% - %A_Hour%`,%A_Min%%postfix%
         FileCreateDir,%tempFolder%\%filename%
      }
   else  if ( A_ThisMenuItemPos = 7)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         filename=%prefix%%A_MMMM% - %A_DDDD%%postfix%
         FileCreateDir,%tempFolder%\%filename%
      }
   else  if ( A_ThisMenuItemPos = 8)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         filename=%prefix%%A_DD%-%A_MM%-%A_YYYY%%postfix%
         FileCreateDir,%tempFolder%\%filename%
      }
   else  if ( A_ThisMenuItemPos = 9)
      {
         InputBox, prefix, Prefix, Insert a prefix if you want
         InputBox, postfix, Postfix, Insert a postfix if you want
         filename=%prefix%%A_DD%-%A_MM%-%A_YYYY% - %A_Hour%`,%A_Min%%postfix%
         FileCreateDir,%tempFolder%\%filename%
      }
   prefix=
   postfix=
   startFrom=
   howmany=
return

_________________
____________________
______________________
kiu
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group