one/two/three/file.txt
, that method means doing three CWD
commands before asking for the file.txt
file to get transferred. This method thus creates quite a large number of commands if the path is many levels deep. This method is mandated by an early spec (RFC 1738) and is how curl acts by default:CWD one < 250 OK. Current directory is /one CWD two < 250 OK. Current directory is /one/two CWD three < 250 OK. Current directory is /one/two/three RETR file.txt
RETR one/two/three/file.txt
CWD
command to the target directory and then it asks for the given file:CWD one/two/three < 250 OK. Current directory is /one/two/three RETR file.txt