The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Path shortcuts on Windows cheat sheet?

Does anybody know of a cheat sheet that contains the path shortcuts on Windows OS? I keep forgetting what the different symbols means, and I'm getting very frustrated trying all the different combinations just to get one thing working right.

My google-fu seems to be off today. :p
slartibartfast Send private email
Monday, August 28, 2006
 
 
Secure
Monday, August 28, 2006
 
 
Good find! Not what I was looking for, but that's a good link to bookmark.

I was talking about stuff like this:

./foo
../foo
~/foo
.foo
..foo
~foo

I can't remember what is the terminology for this stuff. Relative path shorthand?
slartibartfast Send private email
Monday, August 28, 2006
 
 
Don't miss to go one step upward -- there is a complete reference of the command-line tools.

http://technet2.microsoft.com/WindowsServer/en/library/fdc12a63-df4e-49e7-94d6-177536b18eb61033.mspx?mfr=true

Now that you mention it... I don't know how these shortcuts are called, too. The dot and the double-dot... ;)
Secure
Monday, August 28, 2006
 
 
*chuckle*

The reason I started this thread was because I was having a heck of a time with a few methods for getting resources in a .NET project.

The exact situation was that I added a whole folder to the root of a project. The folder is called "Resources." To get an image using the resource manager is ResourceManager.GetObject("CorrectPathHere", "ImageName");

I was trying all kinds of combinations for "CorrectPathHere." I thought that Resources by itself would work, but no dice. So I tried ..\Resources, ..Resources, and a few other combinations. I gave up after a while.

I think my brain is starting to "leak." LOL
slartibartfast Send private email
Monday, August 28, 2006
 
 
Artad Gobeski
Monday, August 28, 2006
 
 
"./foo
../foo
~/foo
.foo
..foo
~foo
"

./foo refers to a file called "foo" with no extension in the current directory.

../foo refers to a file called "foo" with no extension in the parent directory of the current directory.

~/foo refers to a file called "foo" with no extension in the directory "~" one level below the current directory.

.foo refers to a file with no base name and the extension ".foo"

..foo refers to a file with no base name and the extension "..foo"

~foo refers to the file named "~foo" with no extension.

It's fairly easy to remember:

/ refers to the root directory of the current drive.
test/ refers to a first level child of the current dir.
./ refers to the current directory.
../ refers to the parent directory
../../ refers to the parent directory's parent.

The tilde doesn't apply AFAIK on a Windows system.

Ken
KenW
Tuesday, August 29, 2006
 
 
Another thing - "/" doesn't apply in Windows.  For directory indication it's "\" unless Microsoft has changed things recently.  The forward slash ("/") is used as a switch character.

So:

"dir ./foo" returns a "parameter format not correct" error.
"dir .\foo" returns the contents of the folder "foo" under the current directory.

etc.
Karl Perry Send private email
Tuesday, August 29, 2006
 
 
""dir ./foo" returns a "parameter format not correct" error."

But the following works correctly: 

dir "./foo"
Turtle Rustler
Tuesday, August 29, 2006
 
 
~/foo on a web server means directory foo from the virtual directory root. At least this is so for IIS
... Send private email
Tuesday, August 29, 2006
 
 
"Another thing - "/" doesn't apply in Windows.  For directory indication it's "\" unless Microsoft has changed things recently.  The forward slash ("/") is used as a switch character."

Wrong. <g> Both of these are valid in Windows now:

C:/Temp
C:\Temp
KenW
Wednesday, August 30, 2006
 
 
"Wrong. <g> Both of these are valid in Windows now:

C:/Temp
C:\Temp
"

Correcting myself...

Both of *these* are valid in Windows now:

cd "/Temp"
cd "\Temp"

Ken
KenW
Wednesday, August 30, 2006
 
 
/ has always worked internally both in DOS and Windows, but some programs like to preprocess paths and choke on / as they are expecting \ only.
thisoneforthisone
Thursday, August 31, 2006
 
 
And /. refers to the reasons why you should not use Windows at all. :-)
Flow
Thursday, August 31, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz