I am executing this (on a Mac):
find "/Volumes/Untitled3/Done" -type f -size +1400000k -exec mv -fv "{}" "/Volumes/Media/Overflow/" \;
When running the script in the foreground, progress is echoed to the console. As the files are quite large, it takes a while to complete, so I run it in the background (from the Scripts menu) and want to add notifications to show progress (using AppleScript via osascript):
osascript -e 'display notification theFile & " copied"'
(where theFile
would be the output)
Is there a way that I can incorporate this into the -exec mv
? (I appreciate that I can redirect all the output and grab it when the mv has completed, but at that point the script has finished - so it defeats the purpose.)