0

我有一个包含乱码文件名的文件文件夹。文件扩展名也被打乱了。该文件夹包含各种不同的文件格式。文件未加密。

示例:原始文件名 = abcde.pdf 加扰文件名 = !@#FDZ13

有没有办法恢复原始文件名?如果没有,有没有办法区分文件格式(.pdf、.png、...)?最终,我希望再次访问和使用这些文件。

我正在使用窗户。

4

1 回答 1

0

魏先生,原则上,这个案子是很容易的。

我假设您知道可能出现在那里的文件类型集。假设我们希望有 DOC、PDF 和 PNG 文件。

然后我会继续执行以下操作:

- create a subdirectory for every file type you expect
- for each file f
-    for each file type t
-        move f under a nice name with appropriate file extension
         to the subdirectory for file type t
-        try to open the file with the correct application for t
-        continue with next file if it works
-        otherwise continue with next file type
- at this point the directory should contain no files anymore
- move all files from the subdirectories back to this one
- remove the subdirectory.
于 2012-01-05T09:37:06.607 回答