Function Reference


Parses a command-line string and returns an array of the command-line arguments

#include <WinAPIShPath.au3>
_WinAPI_CommandLineToArgv ( $sCmd )


$sCmd The string that contains the full command line. If this parameter is an empty string the function returns an empty array (zeroth element is 0).

Return Value

Success: the array of the command-line arguments. The zeroth array element contains the number of arguments.
Failure: sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information.

See Also

Search CommandLineToArgvW in MSDN Library.


#include <Array.au3>
#include <WinAPIShPath.au3>

Local $aData = _WinAPI_CommandLineToArgv('"a b" c d')
_ArrayDisplay($aData, '_WinAPI_CommandLineToArgv')