Jump to content
Sign in to follow this  
APRES

FTP repeating upload

Recommended Posts

APRES

I need to upload repeatedly few files to the FTP server.

I tried t use

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile1.doc','public_html/file1.txt')

Sleep(10000)

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile2.doc','public_html/file2.txt')

Sleep(10000)

But it doesn't work properly. Or connections is slow. But one of two files is constantly broken.

Files are very small, just few bytes, but still it doesn't work. :whistle:

What is the correct way to solve it?

Edited by APRES

Share this post


Link to post
Share on other sites
B3TA_SCR1PT3R

I need to upload repeatedly few files to the FTP server.

I tried t use

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile1.doc','public_html/file1.txt')

Sleep(10000)

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile2.doc','public_html/file2.txt')

Sleep(10000)

But it doesn't work properly. Or connections is slow. But one of two files is constantly broken.

Files are very small, just few bytes, but still it doesn't work.  :whistle:

What is the correct way to solve it?

<{POST_SNAPBACK}>

you could try a hotkey and function to only access when needed

HotKeySet("^!a","Download"); ^=ctrl, !=Alt

Func Download()
$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile1.doc','public_html/file1.txt')
Sleep(10000) 
$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile2.doc','public_html/file2.txt')
Sleep(10000) 
EndFunc ;==>Download
Edited by B3TA_SCR1PT3R

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
Gigglestick

Okay, are these binary Word documents or plain text files with a ".doc" extension? Do you see the same "broken" data if you open the original .doc file in plain text?

If it's plain text, see if this helps:

Opt("FtpBinaryMode",0)
Edited by c0deWorm

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites
w0uter

I need to upload repeatedly few files to the FTP server.

I tried t use

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile1.doc','public_html/file1.txt')

Sleep(10000)

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile2.doc','public_html/file2.txt')

Sleep(10000)

But it doesn't work properly. Or connections is slow. But one of two files is constantly broken.

Files are very small, just few bytes, but still it doesn't work.  :whistle:

What is the correct way to solve it?

<{POST_SNAPBACK}>

asuming there are my funcs. _FtpPutFile will wait till the upload is completed and retuns success. what does this show you:

$Ftpp = _FtpPutFile($Conn, 'C:\mydir\myfile1.doc','public_html/file1.txt')
Msgbox(0, '', $ftpp)

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×