62 513
Assignments Done
98,8%
Successfully Done
In June 2018

Answer to Question #2261 in C# for basha

Question #2261
Hi

i can download ftp files from C# but it downloads the current date file.
but i need to download the files from previous date to current date .
for example: my files are

xys04-02-2011.zip
xys04-03-2011.zip
xys04-04-2011.zip

i am trying the following code

string dateString = DateTime.Now.ToString("MM-dd-yyyy");
string filename = string.Format("xys{0}.zip", dateString);
string localPath = "c:\\";
string fileName = filename;
string defaultLocalFolder_MCX = "C:\\";



FastZip fzMCX = new FastZip();

try
{


fzMCX.ExtractZip(defaultLocalFolder_MCX + "\\" + "xys03-31-2011.zip", defaultLocalFolder_MCX, "");

}

catch (Exception)
{
//

}


FtpWebRequest requestFileDownload = (FtpWebRequest)WebRequest.Create("ftp://localhost/Source/" + fileName);
requestFileDown
Expert's answer
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions