I was copying files from one directory to another and a couple wouldn’t go over because the filenames were too long. I shortened one of the filenames, hit enter, then all of the file names became the same as the one I was editing plus a sequential number. Undo!! Undo!! (no such luck) What the hell did I do?
This is using any recent version of Winders? (As opposed to Max or Linux or other?)
I’m not sure how files can have identical names in one directory, but . . .
Files with “long” names also have a “short” name that conforms with the old DOS 8.3 standard, although Windows tries to conceal that fact. If you open a command prompt window and type:
DIR /X
you should see the short names alongside the longer names. These short names are generated automatically and sometimes semi-randomly and are sometimes rather cryptic. But if you can see those names, you should find that they are all distinct. You can use these names interchangeably with their long names in any commands that you use.
ETA: But I can’t quite picture how the scenario that you described would happen. Anyway, you will have to figure out for yourself which of the new names corresponded to which of the original names. If you still have the unmolested files in the original source directory, you can compare their file sizes, which will help. I don’t know of any mass “undo” command that will fix that.
Or, if you still have the original files in the source directory, can you just delete the new directory entirely and start over?
Yes, Windows 7 can make this kind of mess. You select multiple files, then press F2 to rename. You get a highlight to change the name of a single file in the list (the first one, typically), and then Windows magically renames ALL selected files to match what you typed, adding (1) (2) etc. as needed. It’s pretty traumatic.
It may be possible to recover the original names by using the Previous Versions feature.
Or, if you spot your mistake right away, press Ctrl+Z
Holy shit-fucking bat guano! I can’t belieeeeeeve even Microsoft would have such a satanic malfeature!
Wait a minute . . . Yes I can.
What a horrific clusterfuck! This thread belongs in The Pit now, over that.
Good thing Control-Z could work even to undo that. But for the OP, it’s surely too late for that now.
This isn’t a recent thing though - renaming multiple files in one operation (along with the potential to fuck it up) has been around since DOS.
REN DIR xxx.xxx yyy.yyy I used to be fairly proficient with DOS at the basic level. I remember secretaries being totally unable to find a file because all their files, with eight character names, were in a single directory - no one had told them about directories. I also remember them going off in tears after spending hours creating some report, only to see it disappear instead of being saved.
Anyone remember - “No Keyboard, Press any key to continue.”
Which made a lot of sense, actually: You were expected to go find a keyboard and plug it in, and pressing any key was a way to signal to the OS that you had done so.
Yes, this is Windows 7. Fortunately only 3 files out of 13 were left behind so it didn’t take too long to get everything in order. I was copying from my personal drive to a shared drive so the files on my personal drive were the ones that were renamed. I figured I had fumble-fingers and hit the magic combination. Pretty scary anyways. Thanks for the ctrl-z tip (hopefully there won’t be a next time).
I got bit by a friendly Windo$e feature. I clicked Open from Notepad or such. My hand must have jittered when I clicked on the appropriate subfolder. Because of the jitter with mouse-button depressed, one folder was moved into another. I didn’t notice that (easy to miss since there’s no message or anything) and went blithely on my way.
The moved subfolder seemed to have disappeared! (It never occurred to stupid me that the folder could have been accidentally moved.) I ended up doing a major download-reinstall, and finally noticed the anomaly during an unrelated search. The folder moving was, IMO, an undesirable feature: I use a move command(*) when I want to move something. Call me unsophisticated but I use the Open option of Notepad when … wait for it … I want to Open a Notepad file.
(* - Yes, I know Windo$e is too friendly to have a discrete Move command. I usually use something like cygwin, or even DOS Command Prompt, to work with Windo$e files.)
Given the Windo$e philosophy about folders, something like
[QUOTE=Windo$e]
Users are far too stupid to understand folders. We select the folders for you, based on criteria we try to keep secret. To help ensure you never try to use absolute pathnames, we’ve made those horrendously long with lots of difficult-to-escape special characters. Should you ever get desperate trying to find a file, use the Search command.
And even then, thanks to our absurdly long pathnames, the path will usually be kept secret unless you’re a guru who knows how to expand the filename display field.
[/QUOTE]
… it seems paradoxical they make it so “easy” to move folders.
Back when Win95 just showed up and allowed you to give your files longer names AND had some system files with longer names I did something stupid like that. I was doing something DOS based, attempted to do something or other to an entire directory and DOS shortened everything to 8 characters. That is, the first 6 original letters of the file name + ~1. So, for example, WIN95BOOOTFILE.BAT would have turned into WIN95B~1.BAT (or ~2 etc if that created a duplicate).
That, was a mess. Luckily, I’d been using DOS based operations for long enough that I managed to rename most of them by hand, just from memory, the rest, IIRC, I could figure out when the system called for the file, couldn’t find it and asked for it. Then all I had to do is go to the folder where it was looking for the missing file and rename the file it had truncated to what it wanted it to be called.
That seemed like an oversight on MS’s part. After giving Windows the ability to have file names that could be longer than 8 characters, they should have given DOS the ability to deal with them as well. I can’t be the only person that had that happen.
You’ve lost me, pathnames are created by the user unless it is a system folder, and the length of Win pathnames tend to be similar to my experiences on other OS’s.
Can you elaborate?
User files can reside in directories with pathnames created by the system. Some tasks require accessing a system file. On some occasions I’ve had no easy way to even determine what a displayed filename was: It exceeded the display field length and there was no expansion option.
One of the files on the laptap where I’m typing now is named
Documents and Settings/764/AppData/Local/Temp/SL800M800_Win7_64_TOSHIBA_HWSetup_Utility_4.11.3.0_TC70102400N.temp/Toshiba Hardware Setup.Win7x64/Windows/winsxs/nvdlei3o.taa/amd64_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_fdbc5a54.manifest
or if you prefer to view it without a scroll-bar, letting your browser replace one of the spaces with a newline:
Documents and Settings/764/AppData/Local/Temp/SL800M800_Win7_64_TOSHIBA_HWSetup_Utility_4.11.3.0_TC70102400N.temp/Toshiba Hardware Setup.Win7x64/Windows/winsxs/nvdlei3o.taa/amd64_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_fdbc5a54.manifest
AFAIK, the only part of this filename that I had a direct role in creating was the “764”, which probably should instead be, to conform with Windo$e philosophy, “Septimus G. Stevens VII, a Toshiba laptop user”
It is often the system environment and not the user which produces long names. Downloaded “.htm” files, for example, usually start with short names but browsers, following the lead of Micro$oft Explorer, by default replace the short file name with its long title.