Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


ftp

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63534
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> ftp
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 ftp - 8/17/2008 4:33:21 AM   
  FROG_MAU

 

Posts: 1
Score: 0
Joined: 8/17/2008
Status: offline
hello, i am at  the first  experince, 
I don't 'konow perfectly, how to use this resquest.


I have a vbs that effects the operations of ftp
 
          Command = "ftp -n  -s:"&ftpscript.txt & " 10.10.0.3"   
          ErrCode = wsh.Run(Command, 1, True)
          If ErrCode = 0 Then 
             WScript.Echo "Nessun errore: ", ErrCode
          Else
             WScript.Echo "Codice errore ricevuto: ", ErrCode
          End If        
                      
'  
I would want to know if it is possible to ri-direct the session interactive ftp, of the ftp in a text file, so that to be able to be analyzed,
in how much "wsh.run" it always furnishes me positive / negative result for the execution of the command,
From the analysis of the prompt ftp could be present errors of transfer,
I have tried with this solution
'     wsh.run "ftp - n - s: "& ftpscript.txt & " 10.10.0.3" & " > errorlog.log ",1,1        
but the ftp doesn't result in error
here following example of an interactive session
 an interactive FTP session  





C:\>ftp ftp.myhost.net
Connected to ftp.myhost.net.
220 *** FTP SERVER IS READY ***
User (ftp.myhost.net:(none)): MyUserId
331 Password required for MyUserId.
Password: ****
230- Welcome to the FTP site
230- Available space: 8 MB
230 User MyUserId logged in.
ftp> cd files/pictures
250 CWD command successful. "files/pictures" is current directory.
ftp> binary
200 Type set to B.
ftp> prompt n
Interactive mode Off.
ftp> mget *.*
200 Type set to B.
200 Port command successful.
150 Opening data connection for firstfile.jpg.
226 File sent ok
649 bytes received in 0.00 seconds (649000.00 Kbytes/sec)
200 Port command successful.
150 Opening data connection for secondfile.gif.
226 File sent ok
467 bytes received in 0.00 seconds (467000.00 Kbytes/sec)
ftp> bye
221 Goodbye.

C:\>
thank
 
 
Post #: 1
 
 RE: ftp - 8/17/2008 6:21:40 PM   
  djredmar


Posts: 61
Score: 0
Joined: 12/11/2006
From: Europe, The Netherlands
Status: offline
You should execute the batch as stdin / stdout

http://windowsitpro.com/article/articleid/93913/how-can-a-vbscript-process-each-line-in-the-stdout-generated-from-a-cmd-command-or-batch.html

note:

not win2000 compatible

_____________________________

blah?

(in reply to FROG_MAU)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> ftp Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts