Waiting for files to copy

Discussion in 'Mac Programming' started by thriftinkid, Apr 8, 2008.

  1. macrumors regular

    Mar 24, 2008
    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?
  2. macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    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
  3. thread starter macrumors regular

    Mar 24, 2008
    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.
  4. thread starter macrumors regular

    Mar 24, 2008
    I'm sorry, the file names are not consistant.

Share This Page