使用GSUTIL从Google Cloud下载文件时会出现错误

发布于 2025-02-07 18:28:15 字数 639 浏览 2 评论 0原文

我正在尝试使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丢了幸福的猪 2025-02-14 18:28:15

这是Windows机器上包含结肠(或其他几个字符)的文件/文件夹的已知问题,请参见在此处登录的问题有关即将发布的修复的详细信息。
另请参阅以前的答案 and(假设该存储桶中的任何文件都没有无效的字符)尝试从下载的文件夹中删除冒号

gsutil -m cp -r "gs://takeout-export-c98906c8-f41d-4702-a512-8a6affaffb1c/20220608T548213Z/Resource: -5623962341676446683" "Resource -5623962341676446683"

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

gsutil -m cp -r "gs://takeout-export-c98906c8-f41d-4702-a512-8a6affaffb1c/20220608T548213Z/Resource: -5623962341676446683" "Resource -5623962341676446683"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文