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: 
this code is a little bit of overkill I think. 

(from the python example <https://docs.python.org/2/library/ftplib.html>) After ftp.login() and setting ftp.cwd() you can just use:

```
os.chdir(ddir)
ls = ftp.nlst()
count = len(ls)
curr = 0
print "found {} files".format(count)
for fn in ls:
    curr += 1
    print 'Processing file {} ... {} of {} ...'.format(fn, curr, count)
    ftp.retrbinary('RETR ' + fn, open(fn, 'wb').write)

ftp.quit()
print "download complete."

```

to download all the files.
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")

```