WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
File Transfer (Read 4441 times)
dmonahan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
File Transfer
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. ???
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2363
The Netherlands
Re: File Transfer
Reply #1 - 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
Back to top
« Last Edit: Feb 7th, 2004 at 7:32pm by Gert »  

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
ansj
YaBB Newbies
*
Offline



Posts: 3
Re: File Transfer
Reply #2 - 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
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2363
The Netherlands
Re: File Transfer
Reply #3 - 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
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1