Phenomic Posted November 26, 2012 Posted November 26, 2012 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?
jaclaz Posted November 26, 2012 Posted November 26, 2012 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? Is it a NTFS filesystem?What is the content of HKLM\\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation (if any?)http://support.microsoft.com/kb/210638/en-usjaclaz
Phenomic Posted November 26, 2012 Author Posted November 26, 2012 Dir /x shows no SFNs, NtfsDisable8dot3NameCreation = 0
jaclaz Posted November 26, 2012 Posted November 26, 2012 (edited) Dir /x shows no SFNs, NtfsDisable8dot3NameCreation = 0Hmmm.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.microsoft.com/kb/142982/en-usHave you tried using Unlocker (or a similar tool) to allow the renaming in the "fully booted" OS? (beware, risk of crash )http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtmlHow 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 November 26, 2012 by jaclaz
Phenomic Posted November 26, 2012 Author Posted November 26, 2012 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.
jaclaz Posted November 26, 2012 Posted November 26, 2012 (edited) 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 November 26, 2012 by jaclaz
Phenomic Posted November 26, 2012 Author Posted November 26, 2012 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.
Phenomic Posted November 26, 2012 Author Posted November 26, 2012 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.jaclazI ran the following batch in recovery console. So renaming doesn't generate SFNs!? set AllowAllPaths = Trueren "Documents and Settings" "Documents and Settings1"ren "Program Files" "Program Files1"ren "Documents and Settings1" "Documents and Settings"ren "Program Files1" "Program Files"
jaclaz Posted November 26, 2012 Posted November 26, 2012 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.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil_file.mspx?mfr=trueTo set the short name for the file longfilename.txt on drive C to longfile.txt, type:fsutil file setshortname C:\longfilename.txt longfile.txtcannot say if it works on dirctories as well jaclaz
Phenomic Posted November 26, 2012 Author Posted November 26, 2012 fsutil is giving me "access denied" fsutil file setshortname "C:\Program Files" C:\PROGRA~1Error: Access is denied.
RamonUn Posted October 14, 2021 Posted October 14, 2021 Sorry to bump this thread up, but I encountered the same problem, and I thought someone else might have it. I ended up writing a simple command line program that re-generate the short-names automatically for a files and folder. See https://github.com/RamonUnch/ssname/ If you want binary/source. It is not following the exact same convention than windows but it is convenient to fix ntfs-3g copied files so that they have a short name that can be used later... It will not reproduce the same short-name than what windows did because it would be impossible anyway. For special names such as "Program Files" you should do it manually.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now