How to set FAT32 short names in Powershell or Windows Command Shell
I need to write a script that se开发者_运维知识库ts the short name of a file on a FAT32 file system. On NTFS I can use the FSUTIL utility under windows but I cannot seem to fathom out how to do this for a FAT32 drive.
Bonus kudos for a window command or powershell script
They made this super hard to get at, but here is one solution: Converting the FileSystemObject's ShortName Property
Unfortunately it's not possible because it's the limitation of the SetFileShortName()
Win32 API
Sets the short name for the specified file. The file must be on an NTFS file system volume.
You can manually hex edit the FAT32 partition to set the short names update the checksums but it'll be quite fragile without support from the file system driver
精彩评论