-
September 3rd, 2012, 09:57 AM
#1
execute shell script present in unix box and ftp the files to windows machine via VBA
I need to execute my shell script present in my unix/solaris box via giving login id and password and ftp the files from unix box to my windows machine using VBA macros.
Please share the VBA code.
Thanks in advance.
-
September 3rd, 2012, 04:15 PM
#2
Re: execute shell script present in unix box and ftp the files to windows machine via
I don't know what VBA support there is for Solaris but as far as I can tell it's doable using an ordinary shell script. See this http://www.cs.bgu.ac.il/~arik/usail/...ris/ftp.1.html
-
September 4th, 2012, 02:57 AM
#3
Re: execute shell script present in unix box and ftp the files to windows machine via
There is no native FTP support in VBA, but Windows has an ftp command line tool much like the Solaris one. It supports the same command line options as those described in the Solaris docs linked to by S_M_A except -t plus a few more, and the meaning of -v apparently is reversed. You should be able to run the tool using the VBA Shell function.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
September 6th, 2012, 08:19 AM
#4
Re: execute shell script present in unix box and ftp the files to windows machine via
Don't know anything of the unix/solaris box. If you can use win32api there's a bunch of sample code to use wininet functions like InternetConnect, InternetOpen, FtpGetFile, FtpPutFile. You can loop files on an ftp server using hFind=FtpFindFirst and hFind=InternetFindNextFile (only for one hFind at the same time). If you want to loop recursively you can first loop the ftp root, create the found directories in a local tempfolder and loop them while requesting it from the ftp sever.
But keep in mind, wininet does not support ftps or sftp, so only ftp is possible. In my own situation I wanted a secure connection for backup files and decided to use wininet for https upload.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|