PC Review


Reply
Thread Tools Rate Thread

Dir of remote machine - RunAs?

 
 
New Member
Join Date: Jul 2010
Posts: 2
 
      13th Jul 2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to debug sql 2005 on remote machine. I am administrator on both my dev machine and remote sql server machine. DR Microsoft C# .NET 1 3rd Nov 2007 11:23 AM
How to debug sql 2005 on remote machine. I am administrator on both my dev machine and remote sql server machine. DR Microsoft Dot NET Framework 0 2nd Nov 2007 10:05 PM
How to debug sql 2005 on remote machine. I am administrator on both my dev machine and remote sql server machine. DR Microsoft ADO .NET 0 2nd Nov 2007 10:05 PM
How to debug sql 2005 on remote machine. I am administrator on both my dev machine and remote sql server machine. DR Microsoft VB .NET 0 2nd Nov 2007 10:05 PM
How to debug sql 2005 on remote machine. I am administrator on both my dev machine and remote sql server machine. DR Microsoft Dot NET 0 2nd Nov 2007 10:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:27 PM.