如何查看或重命名缺少扩展名的文件?
我的文件系统中有一个奇怪的文件,没有扩展名部分。文件名是“15.”。奇怪的是,它不是那些没有点部分的文件名(例如“15”),而是带有点但没有扩展名的文件名(“15.”)——它实际上是 Windows 中的非法文件名,并且不确定它最初是如何创建的。
我知道这是一个文本文件,大小约为 15KB;然而,由于名称的奇怪,我无法用任何应用程序打开它——我尝试过在记事本、写字板等中打开它,尝试过使用“type”命令在commans shell上将其吐出,尝试过shell-open 将文件名括在引号中,等等——所有方法都会导致“文件未找到”错误,记事本除外,它表示未找到“15.txt”。
由于问题的性质以及搜索引擎优化搜索的方式,在任何在线搜索引擎中搜索答案都极其困难。所以,我只是想把这个问题提出来,看看是否有人必须处理类似的问题,并找到任何方法来重命名文件,甚至更改扩展名。
I have a strange file in my file system without the extension part. The filename is "15.". The weird thing is that it is not one of those without the dot part (like just "15"), but the one with the dot but no extension ("15.") -- it is literally an illegal filename in windows, and not sure how did it get created in the first place.
I know it is a text file and it is about 15KB in size; however, due to the weirdness in name, I can't open it with any application -- I've tried to open in notepad, wordpad, etc., have tried the 'type' command to spit it out on commans shell, tried to shell-open enclosing filename in quotes, and so on -- all methods result in a 'file not found' error except the notepad, which says '15.txt' is not found.
Due to the nature of the issue and the way search engines optimize the search, it is extemely hard to search for an answer in any of the search engines online. So, I just wanted to put this question out there and see if anybody had to deal with a similar issue and have found any way to rename the file or even to change the extension.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从其他操作系统(如 Linux)访问磁盘或共享时,可以创建在 NTFS 中有效但无法在 Windows 中使用的文件名。
如果您手头没有安装 Linux,那么请获取一张“live”CD,启动 Linux,然后更改文件名。
这听起来可能很麻烦,但仅限 Windows 的解决方案(移动内容、删除目录)更糟糕。
Filenames that are valid in NTFS but cannot be used from Windows can be created when accesing disks or shares from other operating systems like Linux.
If you don't have a Linux installation at hand, then get hold of a "live" CD, boot Linux, and change the filename.
That may sound like a hassle, but Windows-only solutions (moving stuff around, deleting the directory) are even worse.
使用REN: http://ss64.com/nt/ren.html
它是一个命令提示符命令(运行 > cmd > cd 任意位置 > ren 15. 15.txt )
Use REN: http://ss64.com/nt/ren.html
It is a command prompt command (run > cmd > cd wherever > ren 15. 15.txt )