Topic "Keeping remote directory up to date"

Author Message
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
OK, so I have latest version of WinSCP

I have a weather program that for some reason (as a few other FTP clients seem unable to) cannot communicate with my website host. Fortunately WinSCP is able to do so and I am using it to transfer a small txt file that my weather software produces. I'm using "Keep remote directory up to date" and the "existing files only" option has enabled me to send just the small text file every minute.

All well and good and more power to WinSCP for enabling me to do both things, connect and automatically upload. However, there are a couple of things....

The "KRDUTD" dialogue box is annoying because I can't do anything else while that is open. Perhaps I want to check the time stamp on the uploaded file and I can't/can't seem to be able to do that (i.e. scroll down the directory listing) without shutting down the dialogue.

The other thing is that I am setup to reboot, if there is a power outage, logon to Windows and load the weather software. I assume I can start WinSCP by just incorporating it in the startup folder (I am actually using Win8) in the same way as I start the weather software but (and it is true I haven't investigated this) how do I get it to start Command>KRDUTD and with the appropriate server and local folder and options as there doesn't seem to be any ability to save or invoke it automatically?
Advertisements
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
OK, so after I posted the above I left it running (win user locked) and went to bed. Sometime after 08:00 when I checked it I found that it had stopped operating around 05.34 (2.5 hours previously and approx. 4 hours after starting) with an error exception.

I didn't keep the error and as WinSCP was still up and the KRDUTD box was still open I remained within the dialogue box and restarted it but although it detected the directory change it didn't transfer the file. So I exited from WinSCP and restarted it (having to reset all my parameters again) and this time it detected the directory change and uploaded the file.

Is there any way of determining why the error occurred?
and..
Obviously, there is no way of restarting WinSCP automatically without attending the system?
and..
Again, I need answers to the last paragraph of my previous post.
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
OK, I have had a read and....

So, if I setup the following in upreal.txt in the WinSCP directory...

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
open sftp://userid:password@ftp4.bravehost.com
# Change remote directory
cd /
# Change local directory
lcd c:\cumulus
# Keep up to date
keepuptodate -filemask="realtime.txt"
# Disconnect
close
# Exit WinSCP
exit

....and invoke it with

winscp.exe /console /script=upreal.txt

...winscp should just sit there running and it should copy the realtime.txt file from the c:\cumulus directory to the root directory of my website (overwriting the file there) whenever the file changes and nothing else (i.e. it won't delete anything anywhere, it won't do a 1st time synch of directories, etc.)?

...and if I include that command in a bat file...

echo off
cd c:\winscp
winscp.exe /console /script=upreal.txt

...I can make that start at windows startup?
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Oh well, I haven't got round to setting up the script yet and KRDUTD has failed again.

This time it was at approx 00:45 and I didn't notice until 02:25 (fortunately I was up late otherwise I would have lost another 6 hours possibly).

It failed with a "Invalid Pointer Operation" this time, although again WinSCP doesn't fail just the KRDUTD function, which can't be restarted because although it recognizes the change to directory it won't do the FTP any more so winSCP has to be restarted.

It is a dynamic log covering approx. 4 hours so, unless there is some other file somewhere, I can't tell how long it had been running prior to it failing. Well, that isn't exactly true as it had been going since I restarted it after the last failure so about 18 hours.

The system hadn't been used in that 4 hour log period though (about the same as the last time it crashed) and as there is one FTP per minute, which equates to >240, I don't suppose there is some 256 threshold somewhere where it is failing?
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Oh well..."Invalid Pointer Operation" again. This time at 04:37 after running for only a couple of hours.
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Oh well...the saga continues....

So, because this seems like a very slow forum and I can't get any answers, I was stupid enough to go ahead with my scripting as above and found out, to my cost, that what I thought was a limiting filemask did not inhibit the initial synching of the remote directory. Dammit!!

Now, I guess I should do some more reading and hope that I missed the parameter for inhibiting an initial synch otherwise it looks like I have to go find another piece of software that will do the, what appears to me, simple task of sending a one line text file to my website every minute. Oh and without crashing every so often.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Are you using the latest version of WinSCP?
If not, please upgrade.
If you have the latest, please send me an email, so I can send you back a debug version of WinSCP to track the problem. Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
_________________
Martin Prikryl
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
I am using the version of WinSCP 5.1.4 (build 3020) and I am running under Win8.

The problem seems to be random although I have never had it happen while at the system, it is always after it has been running for some time when my win id is locked, no one else is using the system and typically, apart from WinSCP, only my weather software running (invariably during the night, unfortunately). I dont remember if the first occurrence was the same but the last three have been "Invalid Pointer Operation" and the error box appears twice. On removing the error box, I can restart the krdutd function and it detects that the file has changed but it doesnt FTP it. I have to exit WinSCP and restart it.

To be honest, I am more interested in running the script as, in theory, I have more control over it but I dont know how to ensure that the initial synching doesnt occur. I just need the ability to transfer a single (the same) file every time it changes (once a minute) but I dont have the control over the original placement of that file otherwise I would put it in a local directory where it was the only file.

I have sent you the email.
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Haven't received debug version yet.

Latest failure, instead of 2 x Invalid Pointer Operation, got one of those with a...

Access violation at address 74F21EF3 in module "KERNELBASE.dll" Read of address 03550000

...over the top
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Having received debug version, run it with problem occurring and having sent debug output...

Have again had problem with Invalid Pointer Operation messages plus never ending...

Assertion failed:FTerminal-> OnReadDirectory==DoReadDirectory, file Components\UnixDirView.cpp,line573

...messages.

Have sent you email with location of new debug log file.
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
OK, latest error (attached)....


...if you need the 6mb zip'd file, let me know.
failure.jpg (39.2 KB)

Description: (none)

failure.jpg

gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
removed as duplicate

Last edited by gluepack on 2013-03-14 12:44; edited 1 time in total
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
gluepack wrote:
OK, latest error....

...

...if you need the 6mb zip'd file, let me know.

Please send it too. Thanks.
_________________
Martin Prikryl
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Have sent email with file location
gluepack
[View user's profile]
Donor
Joined: 2013-03-08
Posts: 28
Location: Bulgaria
Problems with 2 x emails (Delivery to the following recipients failed. )
to you at approx. 06:30 GMT and also accessing website was a problem shortly after that..

Content of emails...

Quote:
Not sure if it is coincidence or not but that new debug version has been running for nearly 24 hours now and still seems ok.

The problem is that it is over 2gb currently, which means approx. 90mb zipped. I can�t look at the file with notepad and don�t have another editor on this system, under win 8. If you only need the period around a crash, is it ok to split the file (using GSplit for example) to just give you the back end?

Also, is it ok for me to get rid of those other files off my website and/or system yet?


quickly followed by....


Quote:
Oh no! Following my last email, I went back to check and WinSCP wasn�t running . Now, I don�t know whether it crashed completely or whether I inadvertently closed it.

Sorry about that. I will restart it.



Of course, I was downloading/installing GSplit and I always ignore the "close programs while installing" message so, perhaps, for once, it did have an effect.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License