Dir of remote machine - RunAs?

Windows XP Discussion in 'Windows' started by EKinevel, Jul 13, 2010.

  1. EKinevel

    EKinevel

    Joined:
    Jul 13, 2010
    Likes Received:
    0
    Hi everyone:

    I am trying to pipe the contents a specific folder on a remote machine to a text file on my PC through a command line. My initial command looks like this:

    dir \\10.11.222.33\c$\folder\subfolder\*.log >textfile.txt

    As long as I have mapped a drive to the remote machine (thus already specifying the user name and password), this works great. As the above example goes, I would now have a text file on my PC called textfile.txt, which contains a DIR of *.log files from the remote folder.

    However, if I haven't already mapped the remote drive, this command throws 'Access Denied' errors. I am trying to automate the command by running it through a batch file, so somehow I need to include the user name and password credentials in the actual command. I don't know much about RunAs, but what I've tried hasn't worked.

    And though I appreciate the suggestion, mapping the drives in advance won't work for me because I don't have many available drive letters, and I have many remote machines I need to perform this command on (again, in batch). So I need a way to do this without mapping the remote drives.

    And for various other network reasons, I can't use FTP or Telnet. Yeah. Fun.

    I and the remote machines are running XP Pro.

    If someone knows enough about RunAs to show me EXACTLY what I need to include in the command above, I would be extremely grateful. (Or, any other way to make this work given the limitations I've mentoned.)

    Thanks loads,

    PJ
     
    EKinevel, Jul 13, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. El_Pescador

    Windows XP Mystified by a really remote "Remote Desktop Connection"

    El_Pescador, May 13, 2005, in forum: Windows
    Replies:
    0
    Views:
    946
    El_Pescador
    May 13, 2005
  2. yatfanho
    Replies:
    4
    Views:
    7,743
    yatfanho
    May 20, 2005
  3. pmattis
    Replies:
    4
    Views:
    1,066
    pmattis
    Jun 25, 2007
  4. bigmaz

    Windows Vista 2 Vista's on one machine

    bigmaz, Feb 22, 2008, in forum: Windows
    Replies:
    1
    Views:
    1,108
    muckshifter
    Feb 22, 2008
  5. keel30

    Windows Vista Embroidery machine card reader

    keel30, Oct 4, 2008, in forum: Windows
    Replies:
    6
    Views:
    4,155
    bbbrad
    Oct 21, 2008
  6. Pradeep520

    Windows XP How to Create a Scheduled Task on a remote machine?

    Pradeep520, Feb 23, 2009, in forum: Windows
    Replies:
    2
    Views:
    782
    Pradeep520
    Feb 23, 2009
  7. Bellini
    Replies:
    0
    Views:
    1,139
    Bellini
    May 1, 2010
  8. TenTwenty

    Windows Vista Ping a machine from Windows Explorer

    TenTwenty, May 31, 2010, in forum: Windows
    Replies:
    2
    Views:
    1,083
    TenTwenty
    Jun 1, 2010
Loading...