Create Project Folders Using AppleScript and Automator | Commenter Request

preview_player
Показать описание
In this video, I share with you an AppleScript to create a folder structure for projects. A commenter requested I demonstrate how to create a folder structure with related names. The solution was to use AppleScript and an Automator application as the trigger.

┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

Socials
➤ Twitter - @bocciaman
➤ Instagram - bocciaman
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

DISCLAIMER:
This video and description contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the work I do and allows me to continue to make videos like this. Thank you for your support!

#AppleScript #Automator #FolderCreation
Рекомендации по теме
Комментарии
Автор

hello, the for your great video, could you please make an extended vid explaining how exactly I could get several folders created with each subfolders, so actually going some levels deep?

specularproductions-svense
Автор

Thank you for your tutorial, can you please show us how to create multiple folders in current directory?

bavoch
Автор

Hi, just have one question. Is it possible that the folder where the subfolders are saved in, can open automatically after creating the subfolders? Thanks!

finnplancke
Автор

Why not compile / save the AppleScript as an app from the script editor ?!

cuplove
Автор

I am trying to use your script to add a subsubFolder. I am getting the following error when attempting to compile 'Expected “end” but found “end tell”.' Any idea what this means?

deadmansswitch
Автор

Hello Abdallah, i have an issue with a script im making on applescript, the problem is the following one :
I have files (video in this case) i want to put in a folder, the script first rename the file by its creation date with a prefix that they ask me to write, for example 202335_theprefix i write manually_the originalname of the file.MP4,
then the script look in the output folder if there are folder existing, if not it will create a folder named by the date of creation of the file, the main issue is that the script correctly rename each files, it creates the folder with different dates if the dates of creation are different but it moves every files in the same folder...
Do you think you can help me ?

here the script :

display dialog "Entrez un nom du client :" default answer ""


-- Récupérer la réponse de l'utilisateur et enlever les espaces de début et de fin


set prefix to text returned of result
set prefix to (do shell script "echo " & quoted form of prefix & " | xargs")
set INPUT to choose folder with prompt "Choose the input folder:"
set OUTPUT to choose folder with prompt "Choose an output folder:"

tell application "Finder"
set fileList to every file of INPUT
repeat with theItem in fileList
set firstFile to item 1 of fileList
set fileName to name of theItem
set theCreationDate to creation date of theItem
set name of theItem to (year of theCreationDate as string) & (month of theCreationDate as integer as string) & (day of theCreationDate as string) & "_" & prefix & "_" & fileName
if not (exists folder ((year of theCreationDate as string) & (month of theCreationDate as integer as string) & (day of theCreationDate as string) as string) of OUTPUT) then make new folder at OUTPUT with properties {name:((year of theCreationDate as string) & (month of theCreationDate as integer as string) & (day of theCreationDate as string) as string)}
set folderName to name of {name:((year of theCreationDate as string) & (month of theCreationDate as integer as string) & (day of theCreationDate as string) as string)}


end repeat

if ((year of theCreationDate as string) & (month of theCreationDate as integer as string) & (day of theCreationDate as string) as string) is folderName then
move (every file of folder INPUT whose name extension is "MP4") to folder ((year of theCreationDate as string) & (month of theCreationDate as integer as string) & (day of theCreationDate as string) as string) of OUTPUT
end if

reveal OUTPUT


end tell

display dialog "Terminé"

thanks for reading

titouandauneau
join shbcf.ru