The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
Network paths via cmd.exe?
Apothe0sisHave you ever questioned the nature of your reality?Registered Userregular
You can still change to a UNC directory in a cmd window, you just have to use something smarter than what cmd gives you, the 'cd' command is really pretty stupid. Try 'pushd' instead:
c:\foo\bar>pushd \\kruglor\public
z:\>
It will automatically pick the first available drive letter, starting backwards from z:. Do a popd to unmap the letter and return to where you were:
z:\>popd
c:\foo\bar>
At any time "net use" will tell you what is mapped to where.
aperlscript on
0
Apothe0sisHave you ever questioned the nature of your reality?Registered Userregular
You can still change to a UNC directory in a cmd window, you just have to use something smarter than what cmd gives you, the 'cd' command is really pretty stupid. Try 'pushd' instead:
c:\foo\bar>pushd \\kruglor\public
z:\>
It will automatically pick the first available drive letter, starting backwards from z:. Do a popd to unmap the letter and return to where you were:
z:\>popd
c:\foo\bar>
At any time "net use" will tell you what is mapped to where.
Learned something new! Have to change my sig!
embrik on
"Damn you and your Daily Doubles, you brigand!"
I don't believe it - I'm on my THIRD PS3, and my FIRST XBOX360. What the heck?
I can't speak for anyone else, but when I'm doing computer support over slow lines into third-world countries, a GUI is a high-bandwidth luxury I cannot afford. Even using the Windows Computer Management console against a remote system is painfully slow compared to command line alternatives. Being able to do all of the following from the command-line is incredibly handy when doing remote support, for reasons of both speed and scriptability:
'fraid that UNC paths are not supported under cmd.exe.
I wouldn't say this is accurate. You can't change directory to a UNC path, but you can do just about everything else. You normally need to issue a net use with just the remote system name first to establish your credentials on the remote system (e.g. net use \\server), but after that you can use UNC paths from the command line just about anywhere you'd use regular drive letters and paths, with the exception of the cd command of course. Pushd and popd are pretty neat, I have to say, but I don't like mapping drives in batch files or Perl scripts, or sometimes I just want to run one or two commands using files on a remote system.
Posts
Link to a MS dev's blog:
http://blogs.msdn.com/oldnewthing/archive/2007/02/15/1683851.aspx
You can map a network drive from the command line using net use (http://www.cs.cmu.edu/~help/windows/mapping_drives.html ) if that's the issue, and then just browse it as usual.
It will automatically pick the first available drive letter, starting backwards from z:. Do a popd to unmap the letter and return to where you were:
At any time "net use" will tell you what is mapped to where.
Learned something new! Have to change my sig!
I don't believe it - I'm on my THIRD PS3, and my FIRST XBOX360. What the heck?
- get a list of running processes on a remote system
- kill a running process on a remote system
- get the head or tail of a large log file on a remote system (yes, tail -f \\server\path\filename.log works)
- query, start or stop Windows services on a remote system
- and many other uses I'm sure...
I wouldn't say this is accurate. You can't change directory to a UNC path, but you can do just about everything else. You normally need to issue a net use with just the remote system name first to establish your credentials on the remote system (e.g. net use \\server), but after that you can use UNC paths from the command line just about anywhere you'd use regular drive letters and paths, with the exception of the cd command of course. Pushd and popd are pretty neat, I have to say, but I don't like mapping drives in batch files or Perl scripts, or sometimes I just want to run one or two commands using files on a remote system.I've more or less migrated to Powershell.