Stupid Windows tricks.
Oct. 25th, 2011 09:26 pmHad an accident with a file copying script that left me with a pair of folders I couldn't access or delete. They had names with an unprintable character in them, so copy, move, delete, rename, etc, even with auto name completion, would say the file didn't exist. The problem is, the standard tools doing the standard thing aren't actually *seeing* the real filename, so they can't affect it.
The trick is classic MICROS~1, literally: Open a command line, use "dir /x" to find the actual 8.3 filename, which, since it has a character that's not printable in DOS, gets rewritten as "filena~1". Which is a name that the DOS tools can address - they're all built around the idea of taking non-DOS-legal filenames and converting them to 8.3 and then working on that instead of the real name ANYWAY, so they don't actually care that the smarter tools vomit on whatever character that is.
So, yeah. dir /x pops out the MICROS~1 name, and from there you can do cd, del, rmdir, whatever you want to it.
This is here mostly for my own reference. And hey, you might find it useful someday.
The trick is classic MICROS~1, literally: Open a command line, use "dir /x" to find the actual 8.3 filename, which, since it has a character that's not printable in DOS, gets rewritten as "filena~1". Which is a name that the DOS tools can address - they're all built around the idea of taking non-DOS-legal filenames and converting them to 8.3 and then working on that instead of the real name ANYWAY, so they don't actually care that the smarter tools vomit on whatever character that is.
So, yeah. dir /x pops out the MICROS~1 name, and from there you can do cd, del, rmdir, whatever you want to it.
This is here mostly for my own reference. And hey, you might find it useful someday.
(no subject)
Date: 2011-10-26 02:54 am (UTC)this stunt can be used to create and use directories that are 'visible', but unusable by most people. if you set them as 'hidden' in properties, they're practically impossible for most users to find.
this one goes all the way back to ms first efforts to go beyond 8.3
you'll note ms still relies on the .3+ to 'determine' filetype and as the hook for applications. *headdesk* and this is despite the fact that most apps look at the magic number anyway *sigh*
(no subject)
Date: 2011-10-26 11:51 am (UTC)perl -de0
but any similar language that has, effectively, a shell mode (and therefore doesn't require you to open up an editor) would work.
(no subject)
Date: 2011-10-26 12:43 pm (UTC)I'm sure Explorer replacements a la whatever people use these days instead of Norton commander could also do it, in much the same way - but this way does it with stuff that's definitely there already.
(no subject)
Date: 2011-10-26 12:51 pm (UTC)(no subject)
Date: 2011-10-26 01:35 pm (UTC)(no subject)
Date: 2011-10-26 01:46 pm (UTC)The horror stories I've read about mimetype hijacking or resource fork hijacking or however it works on Mac OS X don't endear me to that approach either.
(no subject)
Date: 2011-10-26 01:58 pm (UTC)Although, do the Live-boot CDs for (frex) Ubuntu come with perl? That would work.
(no subject)
Date: 2011-10-26 01:59 pm (UTC)(no subject)
Date: 2011-10-26 02:18 pm (UTC)(no subject)
Date: 2011-10-26 02:19 pm (UTC)(no subject)
Date: 2011-10-26 02:20 pm (UTC)(no subject)
Date: 2011-10-26 02:20 pm (UTC)(no subject)
Date: 2011-10-26 02:21 pm (UTC)(no subject)
Date: 2011-10-26 02:29 pm (UTC)(no subject)
Date: 2011-10-26 03:47 pm (UTC)(no subject)
Date: 2011-10-26 09:08 pm (UTC)(no subject)
Date: 2011-10-26 10:25 pm (UTC)(no subject)
Date: 2011-10-26 10:32 pm (UTC)(no subject)
Date: 2011-10-26 10:59 pm (UTC)