如何使用Python语言复制具有文件的文件夹,还将具有不同文件的子文件夹与具有相同文件夹级结构的AWS S3 Bukcet
大家好,您能帮助您弄清此问题
如何复制具有PY文件的文件夹,并且ASLO具有带有相同文件夹结构与ASW S3 Bucket Path的特定路径中存在的子文件夹级别文件。文件应以相同的方式反映它们的外观,就像文件夹级别,也应该在S3桶路径中相同
Hi all can you please help to figure out this issue
How to copy a folder having py files, and aslo having sub folder level files which are present in a particular path with the same folder structure to asw s3 bucket path. The files should be reflected as same in the way how they are look like folder level that should be same in s3 bucket path as well
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
为此,有一个完全露面的Python库。通过
文档写得很好,并且您毫不费力。示例部分显示了如何将文件上传到S3,
您应该能够指示包裹在维护其文件夹结构的同时上传文件夹和子文件夹。如果需要单独选择需要上传的文件和文件夹,也可以使用
os.walk
浏览文件和目录。There is a fully fledged Python library for this. Install it via
The documentation is well written and you should have no trouble following it. The examples section shows how to upload file to S3
You should be able to instruct the package to upload the folders and subfolders while maintaining their folder structure. You can also use
os.walk
to walk through your files and directories if you need to individually pick which files and folders need to be uploaded.