theniteowl
Programmer
Is there a way in a VBS script to determine if a file is already open?
I need to move files from one server to another but files are frequently being written into the original folder and I have to know the file I am copying is not currently being written to.
My thought was to read the last modified data and ignore any files that have been modified within the last couple of minutes. It would be far better if I had some way of determining the current state of the file though.
Anyone?
Also, when I move the files they will be going from a Unix box to a Windows box. I need to make sure the file actually arrives whole at the destination before deleting it from the source. Any thoughts on best methods?
Will VBS wait for a response from the copy command before continuing to the next step or do I have to handle it another way? If it waits for a response code I can test for an error and if none found perform the delete.
Thanks.
At my age I still learn something new every day, but I forget two others.
I need to move files from one server to another but files are frequently being written into the original folder and I have to know the file I am copying is not currently being written to.
My thought was to read the last modified data and ignore any files that have been modified within the last couple of minutes. It would be far better if I had some way of determining the current state of the file though.
Anyone?
Also, when I move the files they will be going from a Unix box to a Windows box. I need to make sure the file actually arrives whole at the destination before deleting it from the source. Any thoughts on best methods?
Will VBS wait for a response from the copy command before continuing to the next step or do I have to handle it another way? If it waits for a response code I can test for an error and if none found perform the delete.
Thanks.
At my age I still learn something new every day, but I forget two others.