By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,441 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,441 IT Pros & Developers. It's quick & easy.

Reading Remote Files

P: n/a
Hi all,

I'm trying to get a full directory listing from a remote machine. Anyone
know how? Also, is it possible to read a file from a remote machine, like a
..TXT file or a .XML file in a specified directory without using the C$, D$,
etc. or other shares? Finally, what rights would I need to read/write a
registry key remotely?

Thanks,
Michael C.
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
The UNC path should work for you as long as you have permission

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
"Michael C" <mi*******@optonline.net> wrote in message
news:en**************@tk2msftngp13.phx.gbl...
Hi all,

I'm trying to get a full directory listing from a remote machine. Anyone
know how? Also, is it possible to read a file from a remote machine, like a .TXT file or a .XML file in a specified directory without using the C$, D$, etc. or other shares? Finally, what rights would I need to read/write a
registry key remotely?

Thanks,
Michael C.

Nov 16 '05 #2

P: n/a
OK. Is there a Win32 API function I can call to retrieve a remote
computer's directory?

Thanks,
Michael C

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
The UNC path should work for you as long as you have permission

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
"Michael C" <mi*******@optonline.net> wrote in message
news:en**************@tk2msftngp13.phx.gbl...
Hi all,

I'm trying to get a full directory listing from a remote machine. Anyone know how? Also, is it possible to read a file from a remote machine,
like a
.TXT file or a .XML file in a specified directory without using the C$,

D$,
etc. or other shares? Finally, what rights would I need to read/write a
registry key remotely?

Thanks,
Michael C.


Nov 16 '05 #3

P: n/a

using System;
using System.IO;

namespace ConsoleApplication4 {
class Class1 {
[STAThread]
static void Main(string[] args) {
DirectoryInfo di = new DirectoryInfo("\\\\barney\\CDrive");
foreach (FileInfo fi in di.GetFiles()) {
Console.WriteLine(fi.FullName);
}
Console.ReadLine();
}
}
}

Is that what you want?

Simon Smith
simon dot s at ghytred dot com
http://www.ghytred.com/NewsLook - Usenet for Outlook

On 10 Jun 2004 22:29, "Michael C" wrote:
OK. Is there a Win32 API function I can call to retrieve a remote
computer's directory?

Thanks,
Michael C

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
The UNC path should work for you as long as you have permission

--

W.G. Ryan, eMVP


Nov 16 '05 #4

P: n/a
That looks like it might require a "share" named "CDrive", so it's not quite
what I'm looking for. Here's the deal, I want to get a remote computer
directory listing just like Microsoft SQL Server Enterprise Manager does
when you click on the "Attach Database" function -- no shares required.

Anyone got any ideas?

Thanks,
Michael C.

"Simon Smith" <si*****@community.com> wrote in message
news:b2******************************@ghytred.com. ..

using System;
using System.IO;

namespace ConsoleApplication4 {
class Class1 {
[STAThread]
static void Main(string[] args) {
DirectoryInfo di = new DirectoryInfo("\\\\barney\\CDrive");
foreach (FileInfo fi in di.GetFiles()) {
Console.WriteLine(fi.FullName);
}
Console.ReadLine();
}
}
}

Is that what you want?

Simon Smith
simon dot s at ghytred dot com
http://www.ghytred.com/NewsLook - Usenet for Outlook

On 10 Jun 2004 22:29, "Michael C" wrote:
OK. Is there a Win32 API function I can call to retrieve a remote
computer's directory?

Thanks,
Michael C

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
The UNC path should work for you as long as you have permission

--

W.G. Ryan, eMVP


Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.