mkdir in ftp using shell script if folder doesn't exist mkdir in ftp using shell script if folder doesn't exist shell shell

mkdir in ftp using shell script if folder doesn't exist


One solution would be to always attempt to create the folder - and then ignore any errors. Of course, after creating the folder you need to cd into it - if that gives an error then you've got bigger problems.

The -p option in the shell mkdir is there to ensure no error is raised. FTP doesn't use the shell: it does it for itself.