ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
Hi.
I've made a script to update every few seconds a little file, but I've found my RAM memory is increasing after every upload some little bytes and after a day or two I have to reset program for a big amount of RAM memory.

The script follows as:

[scriptftp="infinite_loop"]:start
openhost("*********","************","***********")
chdir("/public_html")
#do an infinite loop
WHILE("TRUE")
$result=PUTFILE("C:\****\***.***")
IF($result!="OK")
PRINT("Failed transfer")
SLEEP(10)
GOTO :start
END IF
# Wait a few seconds for the next round
SLEEP(4)
END WHILE[/ScriptFTP]

Any suggestion to fix the issue??

Thanks
Hi,

Try removing the WHILE to perform the operation only once and set the script to be run in the scheduler every five minutes, for example.

If you want to run the file transfer more often you can set the loop to be run a limited set of times. For example:

[scriptftp="run_five_times"]$counter = 0

:start

$counter=$counter+1

# Add your own commands here

IF($counter<5)
GOTO :start
END IF[/ScriptFTP]
Thanks for your support.

I've tried with IF command but it's still the same.
I need to upload a tiny file every 4 seconds all the time. May it be the log writing in the program's window to increase memory?? How to free up memory with the loop??
I'll be glad if there's an option...

Best regards (from Spain too!!)
a spaniard like me :) :) :) great ;)

Regarding to your question, unfortunately there is no way to free up the memory that ScriptFTP uses to keep the output but you can try to use ScriptFTP_console.exe instead of the normal ScriptFTP.exe which is the one you are already using. May be the text only version of ScriptFTP does not fill so much memory after running for so long.

But I think this is an error that is related to how ScriptFTP version 3 is programmed. Some customers have reported memory bugs but they have not been addressed yet.
Well, it's the same, increasing memory little by little (12 kB every 4 seconds approximately) but ScriptFTP console weights much less than main program ScriptFTP. I've created a .bat file on the desktop to start both console and file.
I hope this bug will be fixed soon, meanwhile it's a little powerful program.

Best regards y Muchíssssimas gracias ;) .