create folder remotely

  • Thread starter Thread starter Zen
  • Start date Start date
Z

Zen

I need to create folders on a synced PocketPC remotely from desktop in a
batch file. Any recommandations?

Thanks!
 
Paul, Thanks, following works for me, but I have more questions:

[DllImport("rapi.dll", CharSet=CharSet.Unicode)]

private static extern int CeCreateDirectory(string lpPathName, int
lpSecurityAttributes);

[DllImport("rapi.dll", CharSet=CharSet.Unicode)]

private static extern int CeRemoveDirectory(string lpPathName, int
lpSecurityAttributes);

CeCreateDirectory() -- I use 0 in the lpSecurityAttributes, and the
directory created is read only, how can change it to be regular
CeRemoveDirectory() -- If there is files under the directory, it does not
remove the dir, do I need to remove file first, or there is a better way.

Thanks!
 
No, you need to remove any directory contents before deleting the directory.

I've never use RAPI for anything, so I'm not sure how to cause the created
directory to be non-read-only.

Paul T.

Zen said:
Paul, Thanks, following works for me, but I have more questions:

[DllImport("rapi.dll", CharSet=CharSet.Unicode)]

private static extern int CeCreateDirectory(string lpPathName, int
lpSecurityAttributes);

[DllImport("rapi.dll", CharSet=CharSet.Unicode)]

private static extern int CeRemoveDirectory(string lpPathName, int
lpSecurityAttributes);

CeCreateDirectory() -- I use 0 in the lpSecurityAttributes, and the
directory created is read only, how can change it to be regular
CeRemoveDirectory() -- If there is files under the directory, it does not
remove the dir, do I need to remove file first, or there is a better way.

Thanks!


Paul G. Tobey said:
Call CeCreateDirectory().

Paul T.
 
Back
Top