python - Create remote directory using fabric.operations.put() -
I need to put some files on a remote FTP server, create a new directory to enter them. Use clothes? Fabric.operations.put () does not appear because it can handle creating new directories in the remote direction.
Run
mkdir before calling: Run ('mkdir -p / path / to / dir /') (see Handle to create a '/ local / path / to / nested directory', see: -p, - By using
Create an existing directory, if necessary, create a parent directory
Updates (for sftp-only access). FTP: ftp.mkdir ('/ path / to / dir /', in the form of use_sudo = false) (STPTP) as sftp (env.host_string) ftp: Ftp.mkdir's ('/ Local / path / in / myfile', '/ path / to / dir /')
Comments
Post a Comment