Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vbscript for CuteFTP transfers
Message
 
À
27/02/2006 13:46:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
OS:
Windows 2000 SP4
Divers
Thread ID:
01099575
Message ID:
01099813
Vues:
10
Todd,
is this right? should the local folder not have "\" instead of "/". also is the folder active, sometimes when the folder timeout if they are not used, try going into the folder and then coming out and running your ftp. do you know at exactly what line the script fails?
' Change TE's local working folder to g:\code\con2000\data\out\cn8
MySite.LocalFolder = "g:/code/con2000/data/out/cn8"
Slán
~M


>Hello!
>I have some pretty basic vbscript that is to upload a file using the CuteFTP transfer engine but it's not working. This is all new stuff for me. While the script executes, I check if the connection was made and the folders changed everything is ok. They do but the transfer just hangs. I can check the icon in the system tray that the Queue gets stuffed with the job looks good. The job in the queue flips/flops with a timer icon then a green thing icon but it never transfers. I posted the scenario on the CuteFTP forum but I'm hoping someone here can help me faster. If I launch the CuteFTP GUI "manually" and connect the site - then the transfer happens so I kinda think my machine is set up ok? Actually, I can run the sample script that came with my CuteFTP that connects and downloads a text file from their server just fine! I have just slightly altered the below code. I don't see a syntax problem? Do you think my out ftp server needs a tweak of sorts?
>Thanks ...
>
>Code:
> Dim MySite
> Set MySite = CreateObject("CuteFTPPro.TEConnection")
>
> MySite.Protocol = "FTP"
> MySite.Host = "ftp.myplace.com"
> MySite.Login = "mylogin"
> MySite.Password = "apples"
>
>' if necessary, to connect through a proxy server
> MySite.UseProxy = "BOTH"
>
>
>' Change TE's remote working folder
> MySite.RemoteFolder = "/Monday-CN8"
>
>' Change TE's local working folder to g:\code\con2000\data\out\cn8
> MySite.LocalFolder = "g:/code/con2000/data/out/cn8"
>
>' now connect to the site
>' (also called called implicitly when most remote methods are called)
> MySite.Connect
>
>
>' Check the connection was made successfully
> If (Cbool(MySite.IsConnected)) Then
> MsgBox "Yes Connected to: " & MySite.Host & "!"
> End If
>
>
> msgbox(MySite.remotefolder)
> msgbox(MySite.localfolder)
>
>
>' Now transfer the file................
> MySite.Upload "test.jpg"
>
>
> 'Complete. Show the status of this transfer.
> MsgBox "Task done, final status is '" + MySite.Status + "'"
>
> MySite.Disconnect
> MySite.Close
Go raibh maith agat

~M
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform