As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Network paths via cmd.exe?

Apothe0sisApothe0sis Have you ever questioned the nature of your reality?Registered User regular
edited June 2008 in Help / Advice Forum
Is there are a way to do this under windows xp or 2003 server?

Like cd \\server\share or similar nonsense? Or do you have to map the drive first?

(oh everything is samba, homogeneous network and all that).

Apothe0sis on

Posts

  • Options
    ecco the dolphinecco the dolphin Registered User regular
    edited June 2008
    'fraid that UNC paths are not supported under cmd.exe.

    Link to a MS dev's blog:

    http://blogs.msdn.com/oldnewthing/archive/2007/02/15/1683851.aspx

    ecco the dolphin on
    Penny Arcade Developers at PADev.net.
  • Options
    DaenrisDaenris Registered User regular
    edited June 2008
    you can view shares and such using the net command (http://www.computerhope.com/nethlp.htm ) but you can't actually do much beyond just viewing them.

    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.

    Daenris on
  • Options
    Smug DucklingSmug Duckling Registered User regular
    edited June 2008
    Yeah, I've run into this a million times at work. You pretty much just have to map them.

    Smug Duckling on
    smugduckling,pc,days.png
  • Options
    aperlscriptaperlscript Registered User regular
    edited June 2008
    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
  • Options
    Apothe0sisApothe0sis Have you ever questioned the nature of your reality? Registered User regular
    edited June 2008
    thanks guys and gargoyles, that works for me.

    Apothe0sis on
  • Options
    embrikembrik Registered User regular
    edited June 2008
    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?
  • Options
    AngelHedgieAngelHedgie Registered User regular
    edited June 2008
    Just a question - why are you still using cmd.exe?

    AngelHedgie on
    XBL: Nox Aeternum / PSN: NoxAeternum / NN:NoxAeternum / Steam: noxaeternum
  • Options
    Apothe0sisApothe0sis Have you ever questioned the nature of your reality? Registered User regular
    edited June 2008
    Shouldn't I be using cmd.exe?

    Apothe0sis on
  • Options
    vonPoonBurGervonPoonBurGer Registered User regular
    edited June 2008
    why are you still using cmd.exe?
    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:
    eecc wrote:
    '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.

    vonPoonBurGer on
    Xbox Live:vonPoon | PSN: vonPoon | Steam: vonPoonBurGer
  • Options
    AngelHedgieAngelHedgie Registered User regular
    edited June 2008
    Apothe0sis wrote: »
    Shouldn't I be using cmd.exe?

    I've more or less migrated to Powershell.

    AngelHedgie on
    XBL: Nox Aeternum / PSN: NoxAeternum / NN:NoxAeternum / Steam: noxaeternum
Sign In or Register to comment.