Dir of remote machine - RunAs?

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

  1. EKinevel

    EKinevel

    Joined:
    Jul 13, 2010
    Messages:
    2
    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
    Replies:
    0
    Views:
    884
    El_Pescador
    May 13, 2005
  2. yatfanho
    Replies:
    4
    Views:
    7,661
    yatfanho
    May 20, 2005
  3. Prateek

    Want to create an image of my machine .

    Prateek, Aug 31, 2005, in forum: Windows XP
    Replies:
    1
    Views:
    262
    floppybootstomp
    Aug 31, 2005
  4. pmattis
    Replies:
    4
    Views:
    948
    pmattis
    Jun 25, 2007
  5. Pradeep520
    Replies:
    2
    Views:
    722
    Pradeep520
    Feb 23, 2009
Loading...

Share This Page