Mariya Atanasova's Blog

FtpWebRequest: Does the slash matter?

For those of you who are curious: there is indeed a difference when we use the following uris as parameters for our FtpWebRequest class:

ftp://server/ParentDirectory

ftp://server/ParentDirectory/ (Note the slash at the end)

 

Let’s say we want to create a new directory named “new” in "ParentDirectory". With the first uri (without the slash) we issue:

MKD ParentDirectory\new 

 

And with the slash at the end we issue

CWD ParentDirectory

MKD new

 

The same model is applicable for all ftp commands that the FtpWebRequest class supports

 

Published Thursday, June 15, 2006 9:29 PM by mariya

Comments

 

Network Class Library Team (System.Net) said:

This is a current compile of the team's existing blogs on FtpWebRequest. I am going to update it periodically

July 25, 2008 9:24 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker