Hi Guys,
First things first I'm a beginner and I'm trying my first script to count periodically (lets say every 5min) a number of files in a selected folder to move them after to another destination when the appropriate known number is reached.
However, for now I'm stuck to the moving files process for some reason.
I'm sure I have missed something somewhere but I can't figure it at all ;o(
Next will be to set the cycling checking event, well any clue would be appreciated.
Here is my start:
Thank you

First things first I'm a beginner and I'm trying my first script to count periodically (lets say every 5min) a number of files in a selected folder to move them after to another destination when the appropriate known number is reached.
However, for now I'm stuck to the moving files process for some reason.
I'm sure I have missed something somewhere but I can't figure it at all ;o(
Next will be to set the cycling checking event, well any clue would be appreciated.
Here is my start:
Code:
display dialog "How many render frames will you have?" default answer ""
set numberResponse to text returned of result
set renderFolder to choose folder with prompt "Please select directory."
tell application "System Events"
set item_list to POSIX path of every disk item of renderFolder
end tell
tell application "Finder"
set NoOfFiles to the number of items in item_list
if NoOfFiles = numberResponse then move entire contents of folder "Macintosh HD:Users:grace:Downloads:Regis:source" to "Macintosh HD:Users:grace:Desktop:destination"
end tell
Thank you