# Ftp get multiple files

**URL:** <https://techcommunity.softwareag.com/t/ftp-get-multiple-files/125209>\
**Category:** Feedback & ideas\
**Tags:** Discussions-on-this-Forum-System, New-User-Welcome-and-Introductions\
**Created:** [April 28, 2008, 6:24pm UTC](https://techcommunity.softwareag.com/t/ftp-get-multiple-files/125209 "2008-04-28T18:24:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReddyParne](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@ReddyParne](https://techcommunity.softwareag.com/u/ReddyParne)\
**Post date:** [April 28, 2008, 6:24pm UTC](https://techcommunity.softwareag.com/t/ftp-get-multiple-files/125209/1 "2008-04-28T18:24:01Z")

</div>

Hi All,

I am writing a flow service,which pulls the files from server “A” and places them on server “B” using FTP.

1. log on to host server
2. Change to the specified directory  
This dir contains pairs of \*.xml and \*.tiff files …  
Need to ftp all the pairs to the destination.
3. List all the xml files. Take the first xml file and find its corresponding tiff file filename by trimming the xml filename.
4. Ftp the tiff file to the destination. Delete the file from the source.
5. Now ftp the xml file to the destination. Delete the file from the source.
6. Repeat steps 3 to 5 untill all the files in the dir are ftped to the destination.

Note: First the tiff file has to be ftped and only then the corresponding xml file has to be ftped.

Can anyone help me in doing this…

Thanks in Advance,  
Reddyparne

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [April 28, 2008, 9:18pm UTC](https://techcommunity.softwareag.com/t/ftp-get-multiple-files/125209/2 "2008-04-28T21:18:31Z")

</div>

Sounds like you have a reasonable algorithm planned out. What specifically do you need to know?
