Windows 10: Able to find directory with 8dot3 naming convention but not files

Discus and support Able to find directory with 8dot3 naming convention but not files in Windows 10 Support to solve the problem; I have a very strange problem - I have a script that's been running for years on other windows, using the 8dot3 convention. Both the directory and the... Discussion in 'Windows 10 Support' started by techie45, Feb 5, 2018.

  1. techie45 Win User

    Able to find directory with 8dot3 naming convention but not files


    I have a very strange problem - I have a script that's been running for years on other windows, using the 8dot3 convention. Both the directory and the file name have ~ in them. It finds the directory ok, but can't find the file, even though it exists. I've checked, and 8dot3 is enabled. Anyone else see this problem? Any ideas how to solve this? Or where I can go for help?
    Thanks!

    :)
     
    techie45, Feb 5, 2018
    #1
  2. techie45 Win User

    Able to find directory with 8dot3 naming convention but not files

    It didn't help, unfortunately.
     
    techie45, Feb 5, 2018
    #2
  3. SarahKong Win User
    Able to find directory with 8dot3 naming convention but not files

    OK sorry about that.

    I think the best is to reroute this directly to Microsoft and see if they can come up with a solution.

    Are you OK with that?
     
    SarahKong, Feb 5, 2018
    #3
  4. Able to find directory with 8dot3 naming convention but not files

    You can check short names for folders and files.

    Below command checks the short name for winaero.txt file. If no short name is present, blanks are displayed in its place.

    Code: Dir "E:\My_Notes\winaero.txt" /x[/quote]
    To check if short names are disabled on a given volume, run the following as an administrator in a cmd prompt:

    Code: fsutil 8dot3name query c:[/quote] Enabling it is then just a case of running the following:

    Code: fsutil 8dot3name set c: 0[/quote] However, any file or folder created when short name creation was disabled will still have no short name since they are only created at initial file/folder creation, not on subsequent accesses to the file even if short name creation has subsequently been enabled.

    All is not lost as we can add short names for items that are missing them using the fsutil command again, for example:

    Code: fsutil file setshortname "c:\program files" PROGRA~1[/quote] Code: fsutil file setshortname "c:\program files (x86)" PROGRA~2[/quote] This approach can also be used to “repair” short names when they are incorrect.
     
    FreeBooter, Feb 5, 2018
    #4
  5. techie45 Win User
    I've checked and 8dot3name is set correctly.
    C:\Windows\system32>fsutil behavior query disable8dot3 c:
    The volume state is: 0 (8dot3 name creation is enabled).
    The registry state is: 2 (Per volume setting - the default).
    Based on the above two settings,8dot3 name creation is enabled on c:

    I can see the file when I do a dir /X, both short name and regular name, but I can't access the file using it's short name.
     
    techie45, Feb 5, 2018
    #5
  6. If it file has a short name and you can't access it then check to see if you are executing correct command for the file short name.

    Which command do you use to access files with short names?
     
    FreeBooter, Feb 5, 2018
    #6
  7. techie45 Win User
    It's a batch script so I just run it from the command line, but I can't even do a dir on the short filename. Thank you so much for responding.
     
    techie45, Feb 5, 2018
    #7
  8. techie45 Win User

    Able to find directory with 8dot3 naming convention but not files

    I'm able to run the same on another windows 10 machine, just not on this one.
     
    techie45, Feb 5, 2018
    #8
  9. Execute below command to replace or add a new short name to a file/folder.


    Code: fsutil file setshortname "c:\MyLongFileName.txt" MyLong~1[/quote]
     
    FreeBooter, Feb 5, 2018
    #9
  10. techie45 Win User
    I can't change the file name or it's short name, this is being executed by automation unfortunately. I need to figure out why it's able to read directory names that are short names, but not file names *Sad
     
    techie45, Feb 5, 2018
    #10
  11. I'm sorry i could not found the way to only read directory names that are short names, but not file names. But i think you can use For command for this job. You use %~fsI modifier to expands %I to a full path name with short names only.
     
    FreeBooter, Feb 5, 2018
    #11
  12. techie45 Win User
    I want to be able to successfully do the following:
    dir C:\Users\xxx0523\AppData\Local\Temp\CCS_C1~1\util\7ZAEXE~1.BAT
    Even though 7ZAEXE~1.BAT exists, I'm unable to list it. I'm able to do dir C:\Users\xxx0523\AppData\Local\Temp\CCS_C1~1\util successfully. I think there's some setting that's missing on this machine, because I can do it successfully on another windows 10. Sigh!
     
    techie45, Feb 5, 2018
    #12
  13. Able to find directory with 8dot3 naming convention but not files

    Do you get any error message when you use Dir command with 7ZAEXE~1.BAT short name?

    Are you running the batch script or Command Prompt as a administrator?

    What happens when you execute below command?


    Code: Dir C:\PROGRA~1[/quote]

    Lets also repair any NTFS file system errors.

    Please open the Command Prompt by typing cmd.exe into Start Menu, right-click on Cmd.exe, and open it as an administrator.

    Execute below command:


    Code: Chkdsk C: \f[/quote]
     
    FreeBooter, Feb 5, 2018
    #13
  14. techie45 Win User
    I get the directory listing when I do dir c:\progra~1.
     
    techie45, Feb 5, 2018
    #14
  15. That means there is a problem with 7ZAEXE~1.BAT short name.

    Also execute Chkdsk tool maybe its a file system error.
     
    FreeBooter, Feb 5, 2018
    #15
Thema:

Able to find directory with 8dot3 naming convention but not files

Loading...
  1. Able to find directory with 8dot3 naming convention but not files - Similar Threads - Able find directory

  2. Game Bar Captures File Naming conventions

    in Windows 10 Network and Sharing
    Game Bar Captures File Naming conventions: Is there a way to tweak in the settings or date/time region formatting to determine the default naming conventions of how game bar names the captured files?Recently I just noticed that Game Bar screenshots file names are now {game name}_{DD-MM-YY}_{timestamp}, with MM being...
  3. Game Bar Captures File Naming conventions

    in Windows 10 Gaming
    Game Bar Captures File Naming conventions: Is there a way to tweak in the settings or date/time region formatting to determine the default naming conventions of how game bar names the captured files?Recently I just noticed that Game Bar screenshots file names are now {game name}_{DD-MM-YY}_{timestamp}, with MM being...
  4. Game Bar Captures File Naming conventions

    in Windows 10 Software and Apps
    Game Bar Captures File Naming conventions: Is there a way to tweak in the settings or date/time region formatting to determine the default naming conventions of how game bar names the captured files?Recently I just noticed that Game Bar screenshots file names are now {game name}_{DD-MM-YY}_{timestamp}, with MM being...
  5. Setting up Naming Conventions

    in Windows 10 Gaming
    Setting up Naming Conventions: I have a huge amount of music in digital format, and there is a specific way I like it set up, as far as what columns are shown when I open a folder Name, Album, Artist, Genre, Length, Year, etc...for some reason, the column names always seem to revert back to the default. Is...
  6. Screenshot naming conventions

    in Windows 10 Gaming
    Screenshot naming conventions: Why are screenshots named "Screenshot #" instead of the previous, longtime convention of including the date and time in the filename? This convention is also followed by many cell phone manufacturers for both their photos and their screenshots.The same question was asked...
  7. Screenshot naming conventions

    in Windows 10 Software and Apps
    Screenshot naming conventions: Why are screenshots named "Screenshot #" instead of the previous, longtime convention of including the date and time in the filename? This convention is also followed by many cell phone manufacturers for both their photos and their screenshots.The same question was asked...
  8. Naming Convention in Microsoft Defender

    in AntiVirus, Firewalls and System Security
    Naming Convention in Microsoft Defender: Split from this thread. I use windows 10 but I joined the Beta group and I am not sure. I have windows defender. I don't understand what a naming convention is. I have been through so much and I am seriously overwhelmed. I live on a fixed income and it's not an option for...
  9. Way to Make Uploaded Files Fit File Naming Convention

    in Windows 10 Network and Sharing
    Way to Make Uploaded Files Fit File Naming Convention: Is there an office product eg - Sharepoint? that I can use on my website, so visitors who want to upload word or pdf documents for my review, rename those files into my file naming convention? Eg - before they upload the file, they input date etc. Detailed egs - Perhaps...
  10. Drawing Attention to File Naming Convention Post

    in Windows 10 Support
    Drawing Attention to File Naming Convention Post: I just added a reply to this post: https://www.tenforums.com/general-support/104884-whats-proper-way-naming-files.html#post1807489 I have been doing a lot of thinking on file and folder naming conventions. I am thinking those who have years of experience looking for things...

Users found this page by searching for:

  1. Windows 10 how to confirm 8dot3 is enabled

    ,
  2. why is dir /x not showing 8dot3 filenames

    ,
  3. 8dot3 file systen is disabled WINDOWS 10