|
|
Looking for batch folder creator
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2004
Status:
Offline
|
|
Hello, all. Anyone know of a program that can create multiple folders at once? I know how to make multiples in the terminal with the "mkdir "blahblah" {1,2,3}" command, but I'm lazy, and want to click a button to do it. There's a million batch renamers, but I can't find a folder creator.
If no one knows of a program, an Applescript or Automator action that will do this would be appreciated very much. Hell, it would probably be a very popular app/plugin.
Cheers.
Z.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Why can't this be a shell script? This would be trivial to create, why make things harder for yourself than they need to be?
For starters, could you explain exactly how you would intend for this to work?
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2004
Status:
Offline
|
|
Alas, I'm no programmer. The reason for such a thing is just what it sounds like... a need to create multiple folders at once. Do you have the knowledge to create such a script? I'd appreciate it.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2006
Status:
Offline
|
|
I think what Besson is trying to do is to understand why you want to do this - what is it you are trying to achieve. There may be an easier way to do it.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2004
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
[codex]tell application "Finder"
set whereToCreate to choose folder with prompt "Where do you want to create thousands of folders?"
display dialog "How should the folders be called?" default answer "New Folder"
set nameOfFolders to text returned of the result
display dialog "How many folders do you want to create?" default answer "1"
set numberOfFolders to text returned of the result
repeat with i from 1 to numberOfFolders
set thisFolderName to nameOfFolders & " " & i
set thisFolderPath to (whereToCreate as string) & thisFolderName & ":"
if not (exists folder thisFolderPath) then make new folder at whereToCreate with properties {name:thisFolderName}
end repeat
end tell[/codex]
Error checking is left out as an exercise for the reader.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
(
Last edited by JKT; May 19, 2007 at 05:43 AM.
Reason: Forgot to refresh before posting and TETENAL already posted the solution)
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2004
Status:
Offline
|
|
Originally Posted by TETENAL
[codex]tell application "Finder"
set whereToCreate to choose folder with prompt "Where do you want to create thousands of folders?"
display dialog "How should the folders be called?" default answer "New Folder"
set nameOfFolders to text returned of the result
display dialog "How many folders do you want to create?" default answer "1"
set numberOfFolders to text returned of the result
repeat with i from 1 to numberOfFolders
set thisFolderName to nameOfFolders & " " & i
set thisFolderPath to (whereToCreate as string) & thisFolderName & ":"
if not (exists folder thisFolderPath) then make new folder at whereToCreate with properties {name:thisFolderName}
end repeat
end tell[/codex]
Error checking is left out as an exercise for the reader.
Thanks a ton! This is exactly what I was looking for!
You should post this to the freeware/shareware sites. It's a very useful tool.
Thanks again!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|