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/ (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


Comments (2)

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

  2. Qasim says:

    Please elaborate it more…I mean what is the difference in both commands?

Skip to main content