cancel
Showing results for 
Search instead for 
Did you mean: 

From ASCII - FTP

0 Kudos

I'd like to pull a flat file from an FTP location.  I had planned to execute a to ASCII pass to generated a txt file with the variable file name in it and then pass this to a ftp tool like PuTTY (using a shell execute pass) to do the get to a local directory on my VM. 

However...according to the help doc in the MMC you can specify the source file name of an ASCII pass as an ftp location.  I've been playing around with it and can't get this to work but I assume it's because I don't have the ftp:// connection string correct.  Does anyone know the format this needs to be entered as?  The ftp site requires password and username so I was assuming it was ftp://username:password@ftp.site.com/filenamepassword@ftp.site.com/filename but so far no luck.

We currently run 7.2 sp7 in case that makes a difference.

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

former_member2987
Active Contributor
0 Kudos

Pete,

if you cut and paste the FTP string to a browser does it work then?

Matt

0 Kudos

Hey Matt,

No unfortunately that doesn't work, in fact that was the basis of my first test....enter the ftp connection in the URL bar of my browser and verify it works, then use that same string in the ASCII pass.  It consistently gives me the same error "java.io.IOException: Resetting to invalid mark".

former_member2987
Active Contributor
0 Kudos

Hey Pete,

I think you should go back to the original idea then and use the Shell Execute pass.

Matt

0 Kudos

Hey,

Just to close the thread, I gave up on trying to make FTP connection work from ASCII.  I wrote a to ASCII pass to create a .txt file.  This contains the date specific file names I want to 'mget'.  I then run a shell execute to run psftp.exe and pass it my usernaname, ftpsite, pwd, and txt file on the command line.

One quirk.  I couldn't get the the usual format of shell execute to work, and ended up having to start my command string with "echo | blah".  I've no idea why that makes it work but noted it from a previous thread and it appears to kick of the psftp executable correctly.

Answers (1)

Answers (1)

terovirta
Active Contributor
0 Kudos

Hi Pete,

I had to FTP a reports from shared service center's IdM to it's customer organizations.. My notes show I created a command file with the needed FTP-commands in it, the cmd-file was called from the Shell Excecute with "cmd /c theCommandFile.cmd". (With full path pointing to the cmd-file.)

I cannot remember whether I did the cmd-file wrapper because calling the ftp-command didn't work in Shell Execute or due to the other complexity, like FTP'ing the files to 10+ different locations.

regards, Tero