News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

lfn to 8.3 names

Started by Magnum, August 23, 2013, 05:10:30 AM

Previous topic - Next topic

Antariy

Quote from: FORTRANS on August 23, 2013, 07:17:51 AM
Hi,

   Cute.  I have not seen that.  What kind of file system do you
Have?

21-04-13  11:56a        <DIR>          DOWNLO~1        Downloads


There's a feature that allows to disable creation of short filenames on NTFS, so the strange behaviour is possible when for some files there's short filename, but for some other files - there's no short filename, because they were created after that the mentioned feature was enabled.

It's NtfsDisable8dot3NameCreation value in the HKLM\System\CurrentControlSet\Control\FileSystem
If it's set to 1, then short filenames do not created.

FORTRANS

Quote from: Antariy on August 24, 2013, 08:15:57 AM
There's a feature that allows to disable creation of short filenames on NTFS, so the strange behaviour is possible when for some files there's short filename, but for some other files - there's no short filename, because they were created after that the mentioned feature was enabled.

It's NtfsDisable8dot3NameCreation value in the HKLM\System\CurrentControlSet\Control\FileSystem
If it's set to 1, then short filenames do not created.

Hi,

   Thank you.  I had not heard of that feature.  What then happens
with the MS-DOS Int 21H 4EH Find File function?

Regards,

Steve N.

Gunther

Hi nidud,

just one question: What kind of Norton Commander Clone do you use?

Gunther
You have to know the facts before you can distort them.

nidud

#18
deleted

Magnum

Quote from: Antariy on August 24, 2013, 08:15:57 AM
Quote from: FORTRANS on August 23, 2013, 07:17:51 AM
Hi,

   Cute.  I have not seen that.  What kind of file system do you
Have?

21-04-13  11:56a        <DIR>          DOWNLO~1        Downloads

I originally had short file names turned off for performance reasons.

Andy


There's a feature that allows to disable creation of short filenames on NTFS, so the strange behaviour is possible when for some files there's short filename, but for some other files - there's no short filename, because they were created after that the mentioned feature was enabled.

It's NtfsDisable8dot3NameCreation value in the HKLM\System\CurrentControlSet\Control\FileSystem
If it's set to 1, then short filenames do not created.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Antariy

Quote from: FORTRANS on August 24, 2013, 09:17:33 PM
Quote from: Antariy on August 24, 2013, 08:15:57 AM
There's a feature that allows to disable creation of short filenames on NTFS, so the strange behaviour is possible when for some files there's short filename, but for some other files - there's no short filename, because they were created after that the mentioned feature was enabled.

It's NtfsDisable8dot3NameCreation value in the HKLM\System\CurrentControlSet\Control\FileSystem
If it's set to 1, then short filenames do not created.

Hi,

   Thank you.  I had not heard of that feature.  What then happens
with the MS-DOS Int 21H 4EH Find File function?

Regards,

Steve N.


Hi Steve, I don't know really, don't tested it with such layout. This feature, as far as I can get, was designed for a systems that serve some intensive disk-access tasks, for example, with creation of multiple small files - filling an additional field with short file name to the file system table will decrease performance a bit, so, for server systems that do not run 16 bit programs it's suitable to turn short file names off and don't have properly working DOS functions. But maybe in this case NTVDM will convert long file name to short file name on the fly - using the standard filesystem rules - not checked this.



BTW, in the same key as I mentioned in previous post, it will be useful for any machine, not only servers, to create (if there is no such value) and to set the next values:

NtfsDisableLastAccessUpdate - type DWORD, set to 1 - this disables "last access" field updating each time anyone accesses the file. For example, when one opens a folder with a bunch of files - the explorer accesses to these files, and system updates last access time field. This takes much of time, especially on traditional HDDs. Having enabled the feature you may avoid such things - for example, folders with many files will open faster. The "Date modified" field will still work.

NtfsMftZoneReservation - type DWORD, better to set it to 4, but one may choose smaller value, down to 1 - this will preallocate space for MFT, so the filesystem will work faster and MFT will be fragmented less.



Just as fun: having enabled the Win31FileSystem (DWORD type, set to 1 to enable) it's possible to force Windows to create files ONLY with 8.3 filenames.

FORTRANS

Quote from: Magnum on August 25, 2013, 06:42:39 AM
I originally had short file names turned off for performance reasons.

Hi Andy,

   I would not think that you could notice any difference.  Did
you run any tests?  It seems an odd place to try for a change
in performance for a user system.

Quote from: Antariy on August 25, 2013, 05:45:41 PM
Just as fun: having enabled the Win31FileSystem (DWORD type, set to 1 to enable) it's possible to force Windows to create files ONLY with 8.3 filenames.

Hi Alex,

   Well, that does sound like fun.  On someone else's computer
perhaps.  Is there an easy introduction to this subject?  While
this topic does sound rather interesting, it also sounds like a bit
of desperation to think one would need to try and use any of it.

Cheers,

Steve N.

Magnum

I have used many of these listed here.

http://technet.microsoft.com/en-us/library/cc751051.aspx


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\AutoChkTimeOut]
@="1000"

[code]
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ActiveWndTrkTimeout"=dword:00000000
"AutoEndTasks"="0"
"CaretWidth"=dword:00000001
"CoolSwitch"="1"
"CoolSwitchColumns"="7"
"CoolSwitchRows"="3"
"CursorBlinkRate"="530"
"DragFullWindows"="0"
"DragHeight"="4"
"DragWidth"="4"
"FontSmoothing"="0"
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000001
"ForegroundFlashCount"=dword:00000003
"ForegroundLockTimeout"=dword:00030d40
"GridGranularity"="0"
"HungAppTimeout"="1000"
"LowPowerActive"="0"
"LowPowerTimeOut"="0"
"MenuShowDelay"="0"
"PaintDesktopVersion"=dword:00000000
"PowerOffActive"="0"
"PowerOffTimeOut"="0"
"ScreenSaverIsSecure"="0"
"ScreenSaveTimeOut"="600"
"ScreenSaveActive"="0"
"TileWallpaper"="0"
"UserPreferencesMask"=hex:90,12,01,80
"WaitToKillAppTimeout"="5000"
"Wallpaper"=""
"WallpaperStyle"="2"
"OriginalWallpaper"=""
"WheelScrollLines"="3"
"Pattern Upgrade"="TRUE"

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"BorderWidth"="-15"
"CaptionFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,\
  00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"CaptionHeight"="-270"
"CaptionWidth"="-270"
"IconFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\
  00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"IconSpacing"="-1125"
"IconTitleWrap"="1"
"IconVerticalspacing"="-1125"
"MenuFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\
  00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"MenuHeight"="-270"
"MenuWidth"="-270"
"MessageFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
  00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"ScrollHeight"="-240"
"ScrollWidth"="-240"
"Shell Icon BPP"="16"
"SmCaptionFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,\
  00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SmCaptionHeight"="-225"
"SmCaptionWidth"="-180"
"StatusFont"=hex:f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
  00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"AppliedDPI"=dword:00000060
"Shell Icon Size"="32"
"MinAnimate"="0"



[/code]
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Antariy

Quote from: FORTRANS on August 25, 2013, 10:44:08 PM
Hi Alex,

   Well, that does sound like fun.  On someone else's computer
perhaps.  Is there an easy introduction to this subject?  While
this topic does sound rather interesting, it also sounds like a bit
of desperation to think one would need to try and use any of it.

Cheers,

Steve N.


Steve, I don't know really where there's easy introduction into this subject. I'm not a "Microsoft sertified professional" or such :greensml: My advices are based on the experience and/or on features that sometimes AFAIK not even [very well] documented by Microsoft - the source of the info was not very "official". Maybe their site has something on this, or they published something on a papeer, I don't know.

As for the variables I provided, well, NtfsDisableLastAccessUpdate and NtfsMftZoneReservation are the ones I use, and they work as described.

I just noted the ones I decided someone may find useful, but not forcing anyone to use it. Just because that placed in the same key where the variable that disables 8.3 filenames.

Magnum

I believe in being fair.

So that means for me, that means, doing the right thing, no mater what others think.



Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org