Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP map

Status
Not open for further replies.
Jul 18, 2001
68
0
0
US
Hello all;

I'm looking to build a quick map to pick up multiple (up to 100 files) from a UNIX system via FTP and keep the orignal file names. In the past I have used FTP maps/adapters picked up many files and concatenate them into a single file using the OnSuccess Append feature on the output card. In this case if I pick up 100 files in the input I would like to create 100 files on the output.

Thanks!
 
Seems like you can use *.* as the output file name in the event server and it will write the input names accordingly. If not you might want to try and output card rule of something like...

put("file", "path" + word(getresourcename(in1), "\", -1), package(in1))

 
Best way to to use two maps. Map one used the FTP command line type=D, to get the list of files. Pass this to functional map with a put file rule to create a 1 byte local file with the correct file name( plus ".trig". This will trigger another map (wild card file input) that will use the getfilename function to pass to an FTP GET rule (dropping the .trig and use the file name to create the file locally with the name.

This will prevent FTP times outs that could be caused by other methods.

E-mail me the checks :)



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top