Find Jobs
Hire Freelancers

Applescript Help Assistance - add IF statement

$10-30 USD

Închis
Data postării: peste 2 ani în urmă

$10-30 USD

Plata la predare
I have put together this applescript that when a file is added to an action folder, it makes a new directory based on the first portion of the file name, makes a directory called 'images' inside, and then Moves the input file to the 'images' folder inside the newly created folder. This all works GREAT, UNTIL. .dun-dun-dun.. The directory exists already!! (oh no) . So I tried adding some If statements and it still is running the rest of the script fine (which adds in some other files and moves the completed folder set to another folder on my hard drive), but I can not get the file with the same first portion of the name to Move or copy over.. It needs to add an IF Folder exists somewhere and trying to figure it out, but can not get this to work. Any help appreciated. Here is the code: tell application "Finder" activate set target of Finder window 1 to folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk make new folder at folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk with properties {name:fileName} set target of Finder window 1 to folder fileName of folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk make new folder at folder fileName of folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk with properties {name:"images"} set source_folder to folder "new-actiontester" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk set source_folder_list to folder "img-list" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk set source_files to every file in source_folder set source_files_list to every file in source_folder_list set target_folder to folder "images" of folder fileName of folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk set target_Go to folder "GO" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk set folder_Number to folder fileName of folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk set target_folder_list to folder fileName of folder "MAKER" of folder "Desktop" of folder "nathan" of folder "Users" of startup disk repeat with i from 1 to number of items in source_files set source_file to (item i of source_files) move source_file to (target_folder) -- use "copy source_file to folder (target_folder as alias)" to copy the files end repeat repeat with i from 1 to number of items in source_files_list set source_file_list to (item i of source_files_list) copy source_file_list to folder (target_folder_list as alias) -- use "copy source_file to folder (target_folder_list as alias)" to copy the files end repeat copy folder_Number to folder (target_Go as alias) -- use "copy source_file to folder (target_folder_list as alias)" to copy the files end tell
ID-ul proiectului: 32372218

Despre proiect

O propunere
Proiect la distanță
Activ: 2 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte
1 freelancer plasează o ofertă medie de $35 USD pentru proiect
Avatarul utilizatorului
I can quickly fix your Applescript code (in a couple of hours) for just $35. All I need to start is your current script as a separate file (formatting here is broken). Roman
$35 USD în 1 zi
4,9 (33 recenzii)
5,3
5,3

Despre client

Steagul UNITED STATES
Ypsilanti, United States
5,0
3
Metoda de plată a fost confirmată
Membru din mar. 3, 2016

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.