为什么 FileInfo 显示额外的文件扩展名?

发布于 2024-08-04 10:34:15 字数 460 浏览 4 评论 0原文

我在为下载器创建文件下载列表时遇到问题,并且收到无法解释的“文件不存在”返回。我的 .avi 文件返回,但 .exe 和 .txt 文件不存在。

现在,通过拉入整个目录并检查文件内容,我发现我的 .exe 文件显示“.exe.exe”。我的 .txt 文件显示“.txt.rtf”。哇,浏览 Server 2008 中的文件目录只显示一个扩展名。我没有看到将扩展名显示为列的选项,只有“类型”。我的目录如下所示:

Name           Type
File1.exe      Application
File2.txt      Rich Text Document
File3.avi      AVI File

我已经重命名了其中一些文件,也许我只是无法重命名文件。我会尝试使用原件,看看是否可以。也许我需要重命名有问题的文件而不显示扩展名。这对服务器浏览器来说是不是有些奇怪?

谢谢, 詹姆斯

I have been having problems with creating a download list of files for a downloader and was getting unexplained "File Does Not Exist" returns. My .avi files were returning found but but .exe and .txt files were getting the not exists.

I have now found by pulling in the whole directory and examining the file contents that my .exe files are showing ".exe.exe". My .txt files are showing ".txt.rtf". Wow, browsing the file directory in Server 2008 only shows a single extension. I don't see an option to display the extension as a column, just the "type". My directory looks like this:

Name           Type
File1.exe      Application
File2.txt      Rich Text Document
File3.avi      AVI File

I had renamed some of these files, maybe I just cannot rename files. I will try using originals ans see if I am ok. Maybe I need to rename the offending files without the displayed extensions. Is this just something weird with the server browser?

Thanks,
James

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

乖乖公主 2024-08-11 10:34:15

您是否检查过“工具>文件夹选项>查看>隐藏已知文件类型的扩展名”未选中?

该选项应该(或多或少)位于 Windows Server 2008 上的相同位置,我是在家里回答的,所以我只有 XP Pro 可以继续;)

显然我知道,但有时这是我们忽略的明显答案。

只是补充一下 - 没有选项可以在单独的列中显示扩展名。

Have you checked that "Tools > Folder Options > View > Hide extensions for known file types" is unchecked?

The option should be in (more or less) the same place on Windows Server 2008, I'm answering from home so I only have XP Pro to go on ;)

Obvious I know, but it sometimes is the obvious answer that we overlook.

Just to add - there's no option to show the extension in a separate column.

时光瘦了 2024-08-11 10:34:15

Windows 有一个“功能”,可以隐藏已知文件类型的文件扩展名。始终将其关闭,否则您会发现自己会产生这样的问题。

Windows has a "feature" that hides file extensions for known file types. Always turn that off or you'll find yourself creating problems like this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文