I do a lot of bouncing between cygwin and Windows command shell, and I always end up in pain from miscellaneous space and/or parenthesis issues (MS you really killed me with "Program Files (x86)"). What's the best/easiest way to just rename these directories to drop the spaces and/or parens?
-
My choice would be an underscore to replace any non-alphanumeric characters.– o.k.wMar 5, 2010 at 7:40
-
why do you 'cygwin' around in $PROGRAMFILES anyway?– akiraMar 5, 2010 at 8:01
-
You can't rename these directories without getting into heaps of trouble. Some variant of heavyd's answer is probably the way to go.– harrymcMar 5, 2010 at 12:26
-
i access %PROGRAM FILES% because that's how i get to my programs. Not sure what the alternative is.– aronchickMar 5, 2010 at 23:52
3 Answers
Symbolic links in cygwin can help fix this:
ln -s /cygdrive/c/Program\ Files\ \(x86\) /ProgramFilesx86
Learn to use Windows "short names". For example, the short name for "Program Files" is PROGRA~1 and "Documents and Settings" is DOCUME~1.
Type "dir /x
" to see short names.
-
what an interesting idea... so I could go into my PATH and update these all? Mar 5, 2010 at 21:57
-
In Windows you could create a softlink to the directory, using a desired short name, which in reality points to the real destination. Windows 7, and I think Vista, has this capability built in. Similar functionality can be added to XP via the Junction software.
-
Can be accessed in XP via the Junction software. technet.microsoft.com/en-us/sysinternals/bb896768.aspx Mar 5, 2010 at 19:49