Jump to content
Sign in to follow this  

Problem with quotes

Recommended Posts

I write the code down below:

#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>

$cmdHandle = WinGetHandle("C:\Windows\system32\cmd.exe")



Func _CLEANDIR($cmdHandle)
    $vDIR = _CMDREAD("C:\cygwin\bin\ls -1 c:\TEST | gawk '{print "del /Q c:'\'\TEST'\'\" $1 "'\'\*.*"}'")
    Local $i=0
    For $vElement In $vDIR
        MsgBox($MB_SYSTEMMODAL, "", "For Loop: " & $vElement)
    ;MsgBox($MB_SYSTEMMODAL, "", "DIR List: " & $vDIR)
EndFunc;==> _CLEANDIR

Func _CMDREAD($Command)
   Local $CMDRead
   MsgBox($MB_SYSTEMMODAL, "", "DIR List: " & $Command)
   $CMD = Run(@ComSpec & " /c " & $Command, @SystemDir, @SW_HIDE, $STDOUT_CHILD)
   While 1
      $CMDRead &= StdoutRead($CMD)
      If @error Then ExitLoop
   Return $CMDRead
EndFunc ;==>_CMDREAD

I tried different quoting of the quotes in the _CMDREAD function call (line 17) but i can't compile it. I'am absolute new to AutoIt, search already the forum and google, but didn't find the answer to my problem.

On command line it works fine:

C:cygwinbinls -1 c:TEST | gawk '{print "del /Q c:''TEST''" $1 "''*.*"}'

Maybe someone can help.


Thanks in advance!

Edited by falcon1406

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...