AlchemistZim Posted 14 hours ago Posted 14 hours ago (edited) $sURL = "http://1.1.1.1:7539" $sToken = "ABC123" Local $aLib[5] = [1, 2, 3, 4, 5] For $i = 0 To UBound($aLib)-1 $sLib = $aLib[$i] $sPlexTrash = "$sURL$/library/sections/$sLib$/emptyTrash?X-Plex-Token=$sToken$" ConsoleWrite(@CRLF & "Emptying Trash - Library $sLib$ - $sPlexTrash$") RunWait(@ComSpec & '/c curl.exe -X PUT "$sPlexTrash$"', '', @SW_HIDE) Next ConsoleWrite (@CRLF & "<><><><><><><><><><><><><><><><><><><><><><><><><><>" & @CRLF) I am trying to run a curl command with ComSpec, but its not working I can run the same command from CMD, and it works just fine I have a batch file that works perfectly as well I'm missing something, but I don't know what Edited 14 hours ago by AlchemistZim
AlchemistZim Posted 13 hours ago Author Posted 13 hours ago ConsoleWrite(@CRLF & 'curl.exe -X PUT "$sPlexTrash$"'); & @CRLF & @CRLF) Did that...i just removed it from the code i inserted copied code from Console, and it worked in CMD
Solution ioa747 Posted 12 hours ago Solution Posted 12 hours ago (edited) try with RunWait(@ComSpec & ' /c curl.exe -X PUT "' & $sPlexTrash & '"', '', @SW_HIDE) Edit: To run DOS commands, try RunWait(@ComSpec & " /c " & "commandName") ; don't forget " " before "/c" Edited 12 hours ago by ioa747 I know that I know nothing
AlchemistZim Posted 12 hours ago Author Posted 12 hours ago (edited) 23 minutes ago, ioa747 said: try with RunWait(@ComSpec & ' /c curl.exe -X PUT "' & $sPlexTrash & '"', '', @SW_HIDE) Edit: To run DOS commands, try RunWait(@ComSpec & " /c " & "commandName") ; don't forget " " before "/c" That worked Show how is ("' & $sPlexTrash & '") different from ("$sPlexTrash$") i usually use the CMD abbreviation in AutoIt, I changed it based on a suggestion from another thread ***FIGURED IT OUT*** Forgot to add the space after ComSpec before the /c so it was rendering as "cmd.exe/c" instead of "cmd.exe /c" Edited 12 hours ago by AlchemistZim
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now