Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

How to recreate short file names

- - - - -

  • Please log in to reply
10 replies to this topic

#1
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag
I have an installation where "Program Files" and "Documents and Settings" have no short filenames. I know how the short filenames were destroyed but don't know how to recreate them. A running OS won't let you rename them, so I renamed them in Recovery console, but still no SFNs. Any ideas?


How to remove advertisement from MSFN

#2
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,281 posts
  • OS:none specified
  • Country: Country Flag

I have an installation where "Program Files" and "Documents and Settings" have no short filenames. I know how the short filenames were destroyed but don't know how to recreate them. A running OS won't let you rename them, so I renamed them in Recovery console, but still no SFNs. Any ideas?


What is the output of
DIR /X
? :unsure:

Is it a NTFS filesystem?

What is the content of HKLM\\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation (if any?)
http://support.micro...kb/210638/en-us

jaclaz

#3
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag
Dir /x shows no SFNs, NtfsDisable8dot3NameCreation = 0

#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,281 posts
  • OS:none specified
  • Country: Country Flag

Dir /x shows no SFNs, NtfsDisable8dot3NameCreation = 0


Hmmm.
  • What EXACTLY have you attempted in the RC?
  • Can you try with a more "complete" environment such as a PE?
  • Have you tried renaming including a "forbidden" char in the filename?
    http://support.micro...kb/142982/en-us
  • Have you tried using Unlocker (or a similar tool) to allow the renaming in the "fully booted" OS? (beware, risk of crash :ph34r: )
    http://www.softpedia.../Unlocker.shtml
  • How EXACTLY were the filenames destroyed?
  • Do the short filenames appear for newly made files/directories in the running system?

In the worst case you can still manually hex-write them with a tool like DMDE. (you will need to know where your towel is )

jaclaz

Edited by jaclaz, 26 November 2012 - 12:45 PM.


#5
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag
I have 2 storage dirs, one has all the files needed by W7 and the other Win2k. I move one OS out to storage and the other one in, and vice versa, so I share the partition between 2 OSes, follow? I do the moving in Linux, that’s how the SFNs get destroyed.

I thought renaming to something else and back would re-create the SFNs.

#6
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,281 posts
  • OS:none specified
  • Country: Country Flag
I edited the previous post, numbering the questions.

Right now we have ONLY 1/6th of the answers (not counting the unanswered questions in the previous post) :

5. I have 2 storage dirs, one has all the files needed by W7 and the other Win2k. I move one OS out to storage and the other one in, and vice versa, so I share the partition between 2 OSes, follow? I do the moving in Linux, that’s how the SFNs get destroyed.


jaclaz

Edited by jaclaz, 26 November 2012 - 12:47 PM.


#7
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag
lol, I was hoping somebody would give me answers, like some utility that re-generates SFNs.

I don't have PE, new SFNs work fine now, I'm just surprised that chkdsk doesn't fix it.

#8
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag

I edited the previous post, numbering the questions.

Right now we have ONLY 1/6th of the answers (not counting the unanswered questions in the previous post) :


5. I have 2 storage dirs, one has all the files needed by W7 and the other Win2k. I move one OS out to storage and the other one in, and vice versa, so I share the partition between 2 OSes, follow? I do the moving in Linux, that's how the SFNs get destroyed.


jaclaz


I ran the following batch in recovery console. So renaming doesn't generate SFNs!?

set AllowAllPaths = True

ren "Documents and Settings" "Documents and Settings1"
ren "Program Files" "Program Files1"
ren "Documents and Settings1" "Documents and Settings"
ren "Program Files1" "Program Files"


#9
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,281 posts
  • OS:none specified
  • Country: Country Flag

lol, I was hoping somebody would give me answers, like some utility that re-generates SFNs.

But you didn't ask for answers or tools, you asked for ideas instead:

I have an installation where "Program Files" and "Documents and Settings" have no short filenames. I know how the short filenames were destroyed but don't know how to recreate them. A running OS won't let you rename them, so I renamed them in Recovery console, but still no SFNs. Any ideas?

anyway a suitable tool has been suggested, DMDE:
http://softdm.com/
(and yes, I know that next post will be asking an "automagic" tool capable of fixing those names ;))

Maybe fsutil would do:
http://www.microsoft...e.mspx?mfr=true

To set the short name for the file longfilename.txt on drive C to longfile.txt, type:

fsutil file setshortname C:\longfilename.txt longfile.txt


cannot say if it works on dirctories as well :unsure:

jaclaz

#10
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag
fsutil is giving me "access denied"


fsutil file setshortname "C:\Program Files" C:\PROGRA~1
Error: Access is denied.

#11
Phenomic

Phenomic

    Member

  • Member
  • PipPip
  • 277 posts
  • OS:none specified
  • Country: Country Flag
sudo fsutil biatch ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN