Set Variable FOLDER to C:\Test
Set Variable SUB_FOLDER to Sub
Set Variable DELETE to FALSE
 
Set Variable NATIVE_ENGINE to TRUE
Create Folder $FOLDER$
Create Folder $FOLDER$\$SUB_FOLDER$
Set Variable NATIVE_ENGINE to FALSE
 
Write into Text File $FOLDER$\1.txt from Value 111111 (at end of file)
Write into Text File $FOLDER$\2.txt from Value 222222 (at end of file)
Write into Text File $FOLDER$\3.txt from Value 333333 (at end of file)
 
Write into Text File $FOLDER$\$SUB_FOLDER$\1.txt from Value 111111 (at end of file)
Write into Text File $FOLDER$\$SUB_FOLDER$\2.txt from Value 222222 (at end of file)
Write into Text File $FOLDER$\$SUB_FOLDER$\3.txt from Value 333333 (at end of file)
 
MessageBox: Debug, Files created under folders:$NEWLINE$$FOLDER$\$NEWLINE$$FOLDER$\$SUB_FOLDER$$NEWLINE$$NEWLINE$Press YES if you want to continue with deleting these files and folders. 
 
if Variable DELETE Equals YES
  Recursively Delete Files $FOLDER$\$SUB_FOLDER$\*.*
  Recursively Delete Files $FOLDER$\*.*
  Call DLL Function Kernel32.dll->RemoveDirectoryA
end
 
