i checked my file with
MsgBox($MB_SYSTEMMODAL, "", "Contents of the file:" & @CRLF & $sFileRead)
so i know i created the file successfully
but when i want to change it to .bat
by moving it into a junk .bat file (other people probably have a better way of doing it) i get an error.
$CMD = "move "$sFilePath" " & $jointpath & @CRLF
RunWait(@ComSpec & " /c " & $CMD)
i get
error: syntax error
here is the whole function:
Func makeJointBat()
Local Const $sFilePath = _WinAPI_GetTempFileName(@TempDir)
FileWrite($sFilePath, "you don't need to know what i wrote there")
Local $hFileOpen = FileOpen($sFilePath, $FO_READ)
Local $sFileRead = FileRead($hFileOpen)
FileClose($hFileOpen)
$CMD = "move "$sFilePath" " & $jointpath & @CRLF
RunWait(@ComSpec & " /c " & $CMD)
EndFunc ;==>makeJointBat