AutoHotkey Community

It is currently May 27th, 2012, 11:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: July 1st, 2010, 6:09 am 
Offline

Joined: June 26th, 2010, 11:02 am
Posts: 13
Screens
Image
Image
Image

Script
Code:
; Language:       English
; Platform:       Win9x/NT/ XP / Vista / Win7
; Author:         Ekarth
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
Gui, Font, S12 CDefault, Verdana
Gui, Add, Edit, x16 y49 w390 h30 vhome,
Gui, Add, Button, x406 y49 w100 h30 , Browse
Gui, Add, GroupBox, x6 y29 w510 h60 , Drag and Drop / Browse and Select / Type the name / Paste the location of HOME folder here
Gui, Add, Radio, x16 y109 w490 h30 checked vifname, Create subfolders by following Names
Gui, Add, Radio, x16 y309 w390 h30 vifnumber, Create this many number of Subfolders
Gui, Add, Edit, x16 y139 w490 h120 vsubnames ,
Gui, Add, Edit, x406 y309 w100 h30 vsubnumbers Number,
Gui, Font, S16 CREd Bold, Verdana
Gui, Add, Text, x246 y269 w50 h30 , OR
Gui, Font, S12, Verdana
Gui, Add, Button, x326 y349 w180 h40 , Start Operation
Gui, Show, w525 h401, Ekarth Bulk Sub-Folder creator
Return
GuiClose:
ExitApp
; Detect_drag_and_drop
GuiDropFiles:
ControlSetText,edit1,%A_GuiEvent%
return
buttonstartoperation:
   gui,submit,nohide
   IfEqual,home,   ;check if home folder is selected or not otherwise give error
   {
      MsgBox,16,Error,You didnot select any folder!
   }
   Else
   {
   gosub,Whether_create_folder_by_name_or_by_number
   }
   return
Whether_create_folder_by_name_or_by_number:
   IfEqual,ifnumber,1
   {
      gosub,create_folder_by_number
   }
   Else
   {
      gosub,create_folders_by_name
   }
   return
create_folder_by_number:
IfEqual,subnumbers,
{
   MsgBox,16,Error,You didnot specify how many number of sub-folder to create!
}
Else
{
   Loop,%subnumbers%
   {
   FileCreateDir,%Home%\%A_index%
   }
}
return
create_folders_by_name:
IfEqual,subnames,
{
   MsgBox,16,Error,You didnot specify any names for sub-folders in edit-box #2!
}
else
{   
   subnames:= RegExReplace(subnames,"\:|\?|\>|\<|\/|\\","")  ;to remove illegle characters in subfolder name
   Loop, parse,subnames,`n,
   {
      FileCreateDir,%Home%\%A_LoopField%   ;create folders
   }
}
return
buttonbrowse:
FileSelectFolder,outputvar,::{20d04fe0-3aea-1069-a2d8-08002b30309d},1,please select a folder inside which you want to create subfolders
ControlSetText,edit1,%outputvar%
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2012, 2:31 am 
][/code][code][/code][i[/i][/quote]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2012, 2:32 am 
Code:
Code:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2012, 2:32 am 
Code:
Code:


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: rrhuffy and 48 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group