MSFN Forum: How to recreate short file names - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to recreate short file names “Program Files” has no short filename! Rate Topic: -----

#1 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 11:39 AM

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?


#2 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,439
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 11:49 AM

View PostPhenomic, on 26 November 2012 - 11:39 AM, said:

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 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 12:05 PM

Dir /x shows no SFNs, NtfsDisable8dot3NameCreation = 0

#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,439
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 12:20 PM

View PostPhenomic, on 26 November 2012 - 12:05 PM, said:

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

This post has been edited by jaclaz: 26 November 2012 - 12:45 PM


#5 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 12:29 PM

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 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,439
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 12:46 PM

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) :

View PostPhenomic, on 26 November 2012 - 12:29 PM, said:

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

This post has been edited by jaclaz: 26 November 2012 - 12:47 PM


#7 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 01:36 PM

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 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 01:43 PM

View Postjaclaz, on 26 November 2012 - 12:46 PM, said:

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) :

View PostPhenomic, on 26 November 2012 - 12:29 PM, said:

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 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,439
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 01:52 PM

View PostPhenomic, on 26 November 2012 - 01:36 PM, said:

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:

View PostPhenomic, on 26 November 2012 - 11:39 AM, said:

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

Quote

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 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 03:27 PM

fsutil is giving me "access denied"


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

#11 User is offline   Phenomic 

  • Member
  • PipPip
  • Group: Members
  • Posts: 229
  • Joined: 31-July 09
  • OS:none specified
  • Country: Country Flag

Posted 26 November 2012 - 03:42 PM

sudo fsutil biatch ;)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy