Share this page 

Create or remove a directoryTag(s): Powerscript

Declare these functions :
FUNCTION boolean CreateDirectoryA(ref string path, long attr)  
  LIBRARY "kernel32.dll"
FUNCTION boolean RemoveDirectoryA( ref string path ) 
and then
CreateDirectoryA( "C:\TempDir", 0 ) // always 0
RemoveDirectoryA( "c:\tempdir" )
You can't create more than one directory at a time. To create c:\TempDir\t1, you create \TempDir and then \TempDir\t1.