使用GSUTIL从Google Cloud下载文件时会出现错误
我正在尝试使用Windows上的gsutil
从Google Cloud Cli下载多个文件。我使用的命令是
C:\Users\User>gsutil -m cp -r "gs://takeout-export-c98906c8-f41d-4702-a512-8a6affaffb1c/20220608T548213Z/Resource: -5623962341676446683" .
Copying gs://takeout-export-c98906c8-f41d-4702-a512-8a6affaffb1c/20220608T548213Z/Resource: -5623962341676446683/takeout-20220608T386412Z-001.zip...
[WinError 267] The directory name is invalid: '.\\Resource: -5623962341676446683'
CommandException: 1 file/object could not be transferred.
从管理面板中使用的,我能够访问文件夹562396234167676446683
,其内容存在。该命令适用于其他文件夹。您能否让我知道此错误的可能原因。
谢谢
I am trying to download multiple files from google cloud CLI using gsutil
on Windows. The command, I used is
C:\Users\User>gsutil -m cp -r "gs://takeout-export-c98906c8-f41d-4702-a512-8a6affaffb1c/20220608T548213Z/Resource: -5623962341676446683" .
Copying gs://takeout-export-c98906c8-f41d-4702-a512-8a6affaffb1c/20220608T548213Z/Resource: -5623962341676446683/takeout-20220608T386412Z-001.zip...
[WinError 267] The directory name is invalid: '.\\Resource: -5623962341676446683'
CommandException: 1 file/object could not be transferred.
From the admin panel, I am able to access the folder 5623962341676446683
and its contents are present. The command is working fine for other folders. Can you please let me know probable reason for this error.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是Windows机器上包含结肠(或其他几个字符)的文件/文件夹的已知问题,请参见在此处登录的问题有关即将发布的修复的详细信息。
另请参阅以前的答案 and(假设该存储桶中的任何文件都没有无效的字符)尝试从下载的文件夹中删除冒号
This is a known issue with files / folders containing colons (or a few other characters) on Windows machines, see issue logged here for details of a fix due for release soon.
Also see a previous answer here and (assuming none of the files in that bucket have invalid characters) try removing the colon from the downloaded folder with