WatchDirectory Forum | |
https://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Bug Reports >> File Transfer https://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1076088311 Message started by dmonahan on Feb 7th, 2004 at 12:25am |
Title: File Transfer Post by dmonahan on Feb 7th, 2004 at 12:25am
When transfering large files, when WD polls the watched directory it trys to move the file to the designated location while the file is still building. (I.E. it is open for output). Thus, WD attempts to move an incomplete file.
Is there parameter we can set in the script to avoid this or can we start the polling process with a command line command, when we know these large files are ready to move. ??? |
Title: Re: File Transfer Post by Gert on Feb 7th, 2004 at 12:46am
Hello,
You have several options (I would try them in this order): 1. If you have selected the option Don't wait for files to be available on the GUI (watchDirectoryStart), please deselect it. This option, when selected, corresponds to the /C command line option. If you don't select this option, WD will try to open the new/changed files before calling you .bat file. If the program that is writing to the file uses normal Windows file locking (for example, MS Word does this), then WD will start your .bat when the other application closes the file. If you do select this option, WD will call your .bat file as soon as a new/changed file is detected, even when that file is still in use. 2. If '1' does not help it probably means the program writing to the file does not use standard file locking mechanisms. We have 2 free programs (http://www.gdps.dk/products/freeware.shtml) that may be of help. WaitForFile this program will wait until it can gain exclusive access to a file. It uses an algorithm very much like WD, so perhaps it won't be perfect for this situation. I am very confident that the other program, WaitFileComplete, will do the trick. This program monitors the size of a file and waits until the size 'stabalizes'. Hope this helps, Gert |
Title: Re: File Transfer Post by ansj on Nov 28th, 2005 at 10:50am
Hi,
I've got the same problem and WaitFileComplete seems fixs this problem. My next problem is how to do a WaitFileComplete for files with dynamic names. For example: exportfile_yyyymmdd_mmss.txt How can I supply the filename to WaitFileComplete ? Regards Anders |
Title: Re: File Transfer Post by Gert on Nov 28th, 2005 at 4:25pm
Hi Anders,
I am not sure if you are using the version 4 FTP plugin, or a .bat file (with version 3 or v4). When using a .bat script that is started by watchDirectory, you could use WaitFileComplete -seconds 2 -retries 4 "%WD_FILE%" Gert |
WatchDirectory Forum » Powered by YaBB 2.5.2! YaBB Forum Software © 2000-2025. All Rights Reserved. |