Bueno, enfoque totalmente diferente.
Utilice sólo AppleScript.
Paso 1: crear carpetas (entrada y salida)
Paso 2: Crear script
on adding folder items to theAttachedFolder after receiving theNewItems
set text item delimiters to "."
set outputFolder to POSIX file "/Users/YOURUSERNAME/Desktop/random/output/"
tell application "Finder"
set all_files to every item of theNewItems as list
--now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file.
repeat with index from 1 to the count of all_files
set x to ""
repeat 10 times
set x to x & some item of "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
end repeat
set new_name to x
--using our index, we select the appropriate file from our list
set this_file to item index of all_files
set file_name_count to text items of (get name of this_file)
--lets check if the current file from our list (based on index-number) has even any file-extension
if number of file_name_count is 1 then
--file_name-count = 1 means, we extracted only 1 text-string from the full file name. So there is no file-extension present.
set file_extension to ""
else
--yup, we are currently processing a file that has a file-extension
--we have to re-add the original file-extension after changing the name of the file!
set file_extension to "." & item -1 of file_name_count
end if
--let's rename our file and add the file-extension to it
set dupeFile to duplicate this_file to outputFolder
delete this_file
set the name of dupeFile to new_name & file_extension as string
end repeat
end tell
end adding folder items to
Paso 3: guardar script en ~ / Library / Scripts / Folder Action Scripts /
Paso 4: haga clic con el botón derecho del ratón en la carpeta de entrada > Servicios > Configuración de acción de carpeta
Paso5:Conecteelscriptalacarpeta.
Laparteizquierdaagregasucarpetadeentrada,hagaclicenlacarpetaenlalistaizquierda.Enlalistadeladerecha,ustedeligesuscript.
Paso 6: Agrega un montón de archivos en la carpeta de entrada. Reciben nombres aleatorios en la carpeta de salida y se eliminan de la carpeta de entrada.
¡No olvide cambiar el valor de outputFolder dentro del script!