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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating directories

Status
Not open for further replies.

dendog

Programmer
Jun 28, 2001
53
US
Is there any API in C++ or anything in the SQL API which I can use to create new directories on a remote machine.

Thank you in advance.

DENNIS
 
Try:

BOOL CreateDirectory(
LPCTSTR lpPathName, // directory name
LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD
);

the "LPSECURITY_ATTRIBUTES" parameter can be set to "NULL".
 
how would i use this to create a directory ona remote machine

Thanx

DENNIS
 
Code:
#include <windows.h>

if ( !CreateDirectory ( &quot;\\\\ServerName\\ShareName\\DirName&quot;, NULL ))
   { // Failure
     DWORD dwCauseOfFailure = GetLastError ( ); 
     ... }
Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top