Using FTP mget from Visual Basic Shell


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Using FTP mget from Visual Basic Shell
# 1  
Old 05-21-2009
Using FTP mget from Visual Basic Shell

Hi calling a batch file with FTP commands from Visual basing with Shell, it basically to copy files then delete them.

The delete seems to work but the copy, it looks like the mget command doesn't have the complete information on where to copy the files.

Here is the batch file content.
Open 10.2.25.21
user mario mario2
cd /tmp/mario
mget -i *
pwd
mdelete /tmp/mario/*.*


Here is the VB Shell
Private Sub Command8_Click()
ret = Shell("ftp -i -n -s:c:\temp\ftp.bat", vbMaximizedFocus)
End Sub


Remote PC files are in:
/tmp/mario

Local PC Folder (I need to copy the files here)
c:\temp\

Any help will be really appreciated.

Thanks,

Mario.
# 2  
Old 05-25-2009
You might want to add :

lcd C:\temp

to the script before the get.
# 3  
Old 05-26-2009
Thanks it works!!!!!!!!!!!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Visual Basic converting a decimal data type to a label with currency format

Here is the code that I am working with. I have tried several other things. any suggestions? Lbl_Cost_Output.Text = (dDistance * dCostPerMile).ToString("C") The label is formatted correctly in terms of value 0.00 but no dollar sign appears. Please let me know if you have any questions. (1 Reply)
Discussion started by: briandanielz
1 Replies

2. Solaris

How to FTP (get multiple) unix files to windows using visual basic 6

How to FTP (get multiple) unix files to windows using visual basic 6. I am a list of files in my unix location, need to ftp those files to windows machine using Visual basic 6 or VBA macros. Thanks in Advance (3 Replies)
Discussion started by: sureshmani
3 Replies

3. Windows & DOS: Issues & Discussions

[Template] Send SMTP email with Visual Basic Script (vbs) from Command Prompt using CDO

This is a script in visual basic that basically sends an email from an existing account, in this case the example is provided for live.com. It uses CDO (Collaboration Data Objects). All you need to do is replace the fields with the proper information. The email is send from Command Prompt... (0 Replies)
Discussion started by: Tribe
0 Replies

4. Windows & DOS: Issues & Discussions

Start An Hummingbird Exceed Shell With Visual Basic

Hi all. I have a script that I've finished on Solaris 10 recently. Now they want me to build a GUI for it with VB. This is my first endeavour with VB. I am using Visual Studio 2008 to write the GUI. The GUI is all done and has the string var 'Command' that I want to execute in the shell. ... (0 Replies)
Discussion started by: Grizzly
0 Replies

5. Programming

Connect to UNIX server with Visual Basic

Is there any possibility to develop an application using Visual Basic that connects to a unix server (using SSH) and run some commands? I will try to describe what i need : The user should enter the server adress, username and password! Than the user must enter some "filenames" and after... (10 Replies)
Discussion started by: SuperDuck
10 Replies

6. AIX

ftp mget directory

Hi, I have searched everywhere for an answer to this question but couldn't find one so I ask it here. From an AIX 5.3 machine I ftp to another AIX 5.3 server. I want to get all files and only files in a directory. This directory has a subdirectory with files in it. In ftp, I enter the... (5 Replies)
Discussion started by: bheinsius
5 Replies

7. Shell Programming and Scripting

Ftp-mget

For the below mentioned code..Files are getting transferred from first mget statement alone ie from /home/Arun/*EF01/...Could someone help me regarding this ftp -vn <<EOD >$LOG open user lcd ascii mget /home/Arun/*EF01/GLHEC* mget /home/Arun/*EF03/GLHEC* mget... (3 Replies)
Discussion started by: infernalhell
3 Replies

8. Shell Programming and Scripting

shell script - ftp downloading serveral files without mget

Hello guys, i'm searching for a solution how to download all files from root-directory of an ftp-server through an ftp proxy getting through the ftp proxy and download one file with get ist no problem, but mget * does nothing! ftp -n -i -v <<EOF open proxyHost proxyPort user... (19 Replies)
Discussion started by: macProgger23
19 Replies

9. UNIX for Dummies Questions & Answers

mget (ftp command)

hey, I was wondering if its possible to use a complete path and file name using the mget command example mget /dir1/dir2/dir3/file.ext or get /dir1/dir2/dir3/file.ext because whenever i try its says file not found or permission denied..... but if i do cd dir1 cd dir2 cd dir3 mget... (2 Replies)
Discussion started by: Ganondorf
2 Replies
Login or Register to Ask a Question