Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issuing Novell netware commands from within a C++ program.

Status
Not open for further replies.

Kabbal

Programmer
Feb 16, 2000
3
0
0
US
<br>
<br>
Hello,<br>
<br>
I'm hoping someone out there can offer some advice on a problem I'm having. I need to write a program that can map to a LAN, get a directory listing from various parts of that network, and then make some assesments of the files found based on the time/date stamps.<br>
<br>
The assesment portion of the program should be pretty straight forward, but I have no idea how to get the program to map the drives, or even generate the directory listings for that matter. Granted, I could use a series of batch files to map the drives and send the directory listings to text files for later use by the program, but that seems a rather inellegant way to do things. Besides, I'm not sure how I'd even call one of the batch files from within the C++ program.<br>
<br>
Any advice would be greatly appreciated.<br>
<br>
If it helps, below is the batch file equivalent of what I'd like this program to do...<br>
<br>
attach s:=[server name]/sys:comm\from_hq /[user name] &lt;[password]<br>
<br>
s:<br>
<br>
dir &gt;&gt; c:\listing.txt<br>
<br>

 
Look up the shell command and see if that helps. Note that excecution carries on without waiting for it to terminate.<br>
<br>
Good Luck<br>
<br>
D
 
You have to do socket programming to access remote machines. Like FTP server. There are some functions in MFC which can do the same . Then you can get the directory structure of a remote machine. <br><br><br>Thanx<br>Siddhartha Singh<br><A HREF="mailto:ssingh@aztecsoft.com">ssingh@aztecsoft.com</A>
 
Look up the WNet functions in the Windows API.&nbsp;&nbsp;Connect to the drives using UNC paths and the WNet functions.&nbsp;&nbsp;This will allow your program to work regardless of the type of server (Netware/NT) you need to access, and does not require and Novell specific libraries to be linked in to your code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top