Waiting for files to copy

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

  1. macrumors regular

    Joined:
    Mar 24, 2008
    Messages:
    119
    #1
    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

    Joined:
    Jan 5, 2006
    Messages:
    11,012
    Location:
    Redondo Beach, California
    #2
    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. macrumors regular

    Joined:
    Mar 24, 2008
    Messages:
    119
    #3
    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. macrumors regular

    Joined:
    Mar 24, 2008
    Messages:
    119
    #4
    I'm sorry, the file names are not consistant.
     

Share This Page