在Windows 10中复制文件会更改其大小

时间:2019-08-15 15:36:19

标签: windows copy windows-10 filesize

我通过将文件从资源管理器拖到Eclipse中的文件夹,将大文件复制到Windows 10中的新目录。即使 fc 将原始文件和新文件显示为相同,复制的文件的文件大小也会更改。原始文件的大小为209,715,200字节(200 MiB):

serialized with the custom serializer:{"CLASSNAME":"com.examples_so.CatWrapper","INSTANCE":{"name":"Kitty"}}
serialized with the custom serializer:{"CLASSNAME":"com.examples_so.DogWrapper","INSTANCE":{"name":"Brutus","ferocity":5}}

新文件的大小为211,812,352字节:

c:\>dir c:\Users\GeoffAlexander\Documents\Python\200MiB.txt
 Volume in drive C is Windows
 Volume Serial Number is 0447-709A

 Directory of c:\Users\GeoffAlexander\Documents\Python

08/13/2019  09:42 AM       209,715,200 200MiB.txt
               1 File(s)    209,715,200 bytes
               0 Dir(s)  268,331,835,392 bytes free

fc 命令将文件显示为相同:

c:\>dir c:\Users\GeoffAlexander\Desktop\200MiB.txt
 Volume in drive C is Windows
 Volume Serial Number is 0447-709A

 Directory of c:\Users\GeoffAlexander\Desktop

08/15/2019  09:11 AM       211,812,352 200MiB.txt
               1 File(s)    211,812,352 bytes
               0 Dir(s)  268,232,798,208 bytes free

为什么复制的文件具有新的大小?两个大小不同的文件如何相同? Windows 10是否错误地报告了新文件的大小?

如果有任何区别,我正在运行Windows 10 Enterprise Build 1809(操作系统内部版本17763.615)。

1 个答案:

答案 0 :(得分:1)

事实证明文件大小更改不是由于文件复制引起的。而是在将文件签入RTC(Rational Team Concert)时发生了文件大小更改。 RTC签入将现有的LF行定界符转换为CRLF行定界符(Windows行定界符)。有关详细信息,请参见RTC File content types and line delimiters