asalex Posted March 25, 2009 Share Posted March 25, 2009 There is a script that will automatically pour the files on the FTP-server. Confronted with the problem: when processing a large file (> 50 MB) - the script is executed only two hours, then was suspended. Part of the file is not filled - have to fill it manually. I hope for your help. Thank you. Link to comment Share on other sites More sharing options...
BrettF Posted March 25, 2009 Share Posted March 25, 2009 Could you please post your code? Make sure you remove any credentials... What exactly happens? When using FTP upload, then script hangs? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
asalex Posted March 25, 2009 Author Share Posted March 25, 2009 Could you please post your code? Make sure you remove any credentials... What exactly happens? When using FTP upload, then script hangs? This is part of the code : $FileList=_FileListToArray($localpath & $dir[$x],"*",1) If UBound($filelist)<=1 Then ;====== if files not exist ==== Else ;============== if files exist, for folder ===== SoundSetWaveVolume(60) _RunDOS("D:\SERVICE\GOVORILKA\post_out.BAT") _RunDOS($Sendto & " File exist. " & $dir[$x] & ". Begining sending file...") ;============== connecting to ftp-server ============================================= Dim $Conn = _FTPConnect($Open, $server, $username, $pass, $port) If @error Then _RunDOS($Sendto & "error connecting to ftp-server !") Exit EndIf ;=============== for each record in array .... ====================== For $z=1 To $filelist[0] ;For $z=1 To UBound($filelist) ;===================== sending file to FTP =================================== If $dir[$x]="Alternative_place" Then _FTPPutFile($Conn,$localpath & $dir[$x] & "\" & $filelist[$z], $dir[$x] & "\out\" & $filelist[$z]) Else _FTPPutFile($Conn,$localpath & $dir[$x] & "\" & $filelist[$z], $dir[$x] & "\in\" & $filelist[$z]) EndIf No, the script simply stops. Come morning - sent only part of the file. That is, the code will only work a certain amount of time - two hours. It seems so. Link to comment Share on other sites More sharing options...
Spiff59 Posted March 25, 2009 Share Posted March 25, 2009 (edited) I'd be suspecting either some garbage in your FileList array, or that your server has some limit on connection time, or that about 2 hours into your script you hit a huge or corrupted file that's causing some sort of server error/timeout. I'd be looking at your FTP settings, or for problems external to your a script. Displaying/Logging the filenames processed during a run would tip you off to which file is causing the failure. You could then see how it differs from the other files, whether it's corrupted, or larger. You could test sending that file first, monitor it, and see what result you get from the FTP transfer. Your (partial) script looks good to me. Edited March 25, 2009 by Spiff59 Link to comment Share on other sites More sharing options...
asalex Posted March 25, 2009 Author Share Posted March 25, 2009 1. In this case, the array is nothing but one big archive. 2. Restrictions on the time of connection to the server side does not, as such files are sent by hand is fine: put in the night - by morning, all covered on the server. 3. The file is definitely not corrupted as the rest of the morning, pour on to the server manually fine. Thank you for your reply. I'll try another set binary transfer mode (suggested in another forum) and do so: $sResultFtpPutFile = _FTPPutFile($Conn, $localpath & $dir[$x] & "\" & $filelist[$z], $dir[$x] & "\in_mail\" & $filelist[$z]) If @error Then MsgBox(32, 'error !' & @CRLF & _ @TAB & '@error=' & @error & @CRLF & _ @TAB & '$sResultFtpPutFile=' & @error) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now