I have a script that moves files to Trash, but I work with tens of thousands of files so I need it to do fast. Current script gets Finder stuck and I need to relaunch Finder every time I use the script.
set source_folder to POSIX path of (path to pictures folder) & "4K Stogram"
do shell script "/usr/bin/find " & quoted form of source_folder & " -type f -exec /bin/mv {} ~/.Trash \\;"
display notification "All images were processed." with title "New" sound name "Glass.aiff"
tell me to quit
Wouldn't the shell script's 'rm -f' command make it faster? How the script should look like if yes? I don't need those files in Trash anyway, I delete them right after the script finishes the job.