logo Cd change the current folder on the remote computer

Return to Introduction     

cd  path

 

Where:

 

pathis the path on the remote computer that is to be made the current folder. When the change has been made, the new folder is not automatically listed. If the script is being run interactively, i.e. not from a command prompt, and the new folder should be listed, use the "ls" command to refresh the list of files on the remote computer. If path contains a space, it must be enclosed in double quotes.  For example:

 

cd "\sub folder\"

 

Examples:

 

cd  \

cd  pub

cd  \pub\test

cd "\sub folder\"

 

Sample Script:

 

* Sample script using the "cd" command.

* Switch to \test\test2\ on the remote host.

cd  \test\test2

* Upload test.txt to \test\test2\.

put test.txt

* Return to the root folder on the remote host.

cd  \

ls