Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
Hey guys, I'm new to writing script. I have a script that moves files from one location to another so they can be uploaded to an ftp server. The problem is that the script tries to move on before they files are copied over. I need to write a script that check folder b every 10-15 sec to see if there is any change in the folder (file size growing because content are being copied into it). If there is no change within that time, then it is free to move on to the next step. Again I'm new to programming code in general. I have been using applescript. ANy Ideas?
 

ChrisA

macrumors G5
Jan 5, 2006
12,917
2,169
Redondo Beach, California
I need to write a script that check folder b every 10-15 sec to see if there is any change in the folder (file size growing because content are being copied into it). If there is no change within that time, then it is free to move on to the next step. Again I'm new to programming code in general. I have been using applescript. ANy Ideas?

It is MUCH better to check the file to see if another process has the file open for write then to just wait until it stops getting bigger
 

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
It is MUCH better to check the file to see if another process has the file open for write then to just wait until it stops getting bigger

the only issue with that is there is no file I am opening. I am moving a group of files into the folder to be uploaded to a server. And the files name are constant.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.