Explorar el Código

sftp mkdir

master
Jeong Geol Kim hace 4 años
padre
commit
bcf0999c6b
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1
    2
      auto_extract.py

+ 1
- 2
auto_extract.py Ver fichero

75
                     sftp = paramiko.SFTPClient.from_transport(transport)
75
                     sftp = paramiko.SFTPClient.from_transport(transport)
76
                     #FIXME: send file recursively
76
                     #FIXME: send file recursively
77
                     full_list = glob.glob(id + "/*")
77
                     full_list = glob.glob(id + "/*")
78
+                    sftp.mkdir('/data/'+full_list[0][5:22])
78
                     for f in full_list:
79
                     for f in full_list:
79
-                        print(f)
80
-                        print(f[5:])
81
                         sftp.put(f,'/data/'+str(f[5:]))
80
                         sftp.put(f,'/data/'+str(f[5:]))
82
                     sftp.close()
81
                     sftp.close()
83
                     transport.close()      
82
                     transport.close()      

Loading…
Cancelar
Guardar