CamEra Posted March 24, 2009 Share Posted March 24, 2009 Hi, I want to write a script to ftp all the log files in a directory to our ftp server - no problem there. I intend to use the GetFileNameList to get a list of names and then to ftp them in sequence and as each file is successfully transferred to move the file to an archive directory using File.MoveFile. The potential problem with this scheme is that the present logging file will be open and shouldn't be ftp'ed or moved. Is there any way to know if a file is locked? One of the reasons to do it this way is that if any files are missed one day e.g. the ftp server is down, the internet link is down etc. then they will just be picked up the next day. If all goes to plan there should be only one file per day to transfer - I have my logging file created on a daily basis. Thanks Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.