# Using FTP mget from Visual Basic Shell

**URL:** <https://community.unix.com/t/using-ftp-mget-from-visual-basic-shell/240699>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [May 21, 2009, 1:53pm UTC](https://community.unix.com/t/using-ftp-mget-from-visual-basic-shell/240699 "2009-05-21T13:53:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mario120560](https://community.unix.com/letter_avatar/mario120560/32/5_5575768a8748004e209b776fc1b2916d.png) [@Mario120560](https://community.unix.com/u/Mario120560)\
**Post date:** [May 21, 2009, 1:53pm UTC](https://community.unix.com/t/using-ftp-mget-from-visual-basic-shell/240699/1 "2009-05-21T13:53:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![otheus](https://community.unix.com/user_avatar/community.unix.com/otheus/32/505_2.png) [@otheus](https://community.unix.com/u/otheus)\
**Post date:** [May 25, 2009, 5:51am UTC](https://community.unix.com/t/using-ftp-mget-from-visual-basic-shell/240699/2 "2009-05-25T05:51:40Z")

</div>

You might want to add :

lcd C:\temp

to the script before the get.

---

<div class="post-metadata">

**Author:** ![Mario120560](https://community.unix.com/letter_avatar/mario120560/32/5_5575768a8748004e209b776fc1b2916d.png) [@Mario120560](https://community.unix.com/u/Mario120560)\
**Post date:** [May 26, 2009, 1:30pm UTC](https://community.unix.com/t/using-ftp-mget-from-visual-basic-shell/240699/3 "2009-05-26T13:30:20Z")

</div>

Thanks it works!!!!!!!!!!!!
