Q #1: How do I create a directory from
within AutoIt?
---------------------------------------------------------------------
A #1: By using a DOS command.
Run, %Comspec% /C MD
C:\\Temp\\example
-----------------------------------------------------------------------------
Q #2: How do I delete a directory from within AutoIt?
---------------------------------------------------------------------
A #1: Again by using a DOS command.
Run, %Comspec% /C RD
C:\\Temp\\example
But in this case the directory must be empty before you run this
command. So a command like:
Run, %COMSPEC% /c del C:\\Temp\\example\\*.*
Send, y{ENTER}
would need to be run first.
-----------------------------------------------------------------------------
Q #3: I'm trying to delete all the files
in C:\TEMP with the following:
RunWait, del C:\\TEMP\\*.* /q
But I always get a 'Failed to run
program'-error.
(The OS is Windows 2000 Pro) What am
I doing wrong ?
---------------------------------------------------------------------
A #1: You need something like:
runwait, %COMSPEC% /c del
c:\\temp\\*.* /q
Because "del" is a DOS
internal command. You need to specify
the
command shell that it is internal
to. That is what the %COMSPEC%
does.