Question: Dear All,
I am writing a smpp application using c# and Devshock protocol.Here the mySmppClient\_evDeliver\_Sm method get the parameter "**e**" as a parameter on "**Devshock.Protocol.SmppClient.Deliver\_SmEventArgs e**" and then using "e" we get rest of the value like:**e.Params.Body.Data\_Coding** and **e.Params.Body.Short\_Message**.

```
private void mySmppClient_evDeliver_Sm(object sender,Devshock.Protocol.SmppClient.Deliver_SmEventArgs e)
        {
           string ShortMessage = mySmppClient.GetShortMessage(e.Params.Body.Data_Coding, e.Params.Body.Short_Message);        
           MessageBox.Show(ShortMessage);         
        }

```

**Now my question is:** 

**How may i get the value Params.Body.Data\_Coding and Params.Body.Short\_Message without using "e" as a parameter**.It will be better for me if i get the values using any object or like this below structure.How i do that?

```
private void mySmppClient()
{
  //declare any object or any other way let abc

   string ShortMessage=mySmppClient.GetShortMessage(abc.Params.Body.Data_Coding, abc.Params.Body.Short_Message );
   MessageBox.Show(ShortMessage);

}

```

I shall be very much glade to those kind heart who help me to solve this problem.
Thanks in Advance
Riad

Answer: 
I've managed to crack this, so now posting the relevant bit of code for future visitors:

```
filenames = ftp.nlst() # get filenames within the directory
print filenames

for filename in filenames:
    local_filename = os.path.join('C:\\test\\', filename)
    file = open(local_filename, 'wb')
    ftp.retrbinary('RETR '+ filename, file.write)

    file.close()

ftp.quit() # This is the “polite” way to close a connection

```

This worked for me on Python 2.5, Windows XP.
Instead of using Python lib to ftp download a directory, we can call a dos script from python program. In the dos script we would use the native ftp protocol which can download all file from the folder using `mget *.*`.

```
fetch.bat
ftp -s:fetch.txt

fetch.txt
open <ipaddress>
<userid>
<password>
bin (set the mnode to binary)
cd </desired directory>
mget *.*
bye

fetch.py
import os
os.system("fetch.bat")

```