Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Bulk Sub-Folder creator (by name/by number)


  • Please log in to reply
3 replies to this topic
Ekarth
  • Members
  • 13 posts
  • Last active: May 15 2011 04:53 AM
  • Joined: 26 Jun 2010
Screens
Posted Image
Posted Image
Posted Image

Script
; 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


Bbbbbbbbbbb
  • Guests
  • Last active:
  • Joined: --
][/code][i[/i][/quote]

Bbbbbbbbkkkkkkkyyyyyyyttt
  • Guests
  • Last active:
  • Joined: --
[code=auto:0][/code]

Bbbbbbbbkkkkkkkyyyyyyyttt
  • Guests
  • Last active:
  • Joined: --
[code=auto:0][/code]