Check for open file in DTS

  • Hi!  I have a DTS package that includes an FTP task to transfer a text file to a remote site.  I need to make sure the file isn't being written to when the transfer starts.  What I need, please, is an ActiveX script that checks if the file is open and if so terminates the task. 

    Thank you

    Cath

  • The logical way would be to use the filesystemobject. However, there appear to be no attributes that allow you to find out if a file is open.

    The policy you should be using is to ONLY use copied files as the source. Never try to import the live file. You can copy a file even if it is open.

    If the problem relates to the source being open, the best way is to use a command to attempt to open the file. If that returns an error, then you can abort.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • Thank you Jonathan.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply