#1743 closed Bug (No Bug)
fileexists
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | Cc: |
Description
I'm getting different results from the below two examples
;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)
;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)
;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.
;C:\Program Files\Internet Explorer\iexplore.exe)
Attachments (0)
Change History (4)
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
Ok, apologies; this may not be a bug afterall
sendto is supplying the commandline path with quotes
"C:\Program Files\Internet Explorer\iexplore.exe"
and fileexists does not appear to handle it properly when quoted.
zzz "C:\Program Files\Internet Explorer\iexplore.exe" (fails)
zzz C:\Program Files\Internet Explorer\iexplore.exe (works)
Replying to anonymous:
Clarification; this was produced from putting a shortcut into sendto folder where
one could then right click and send .exe to the autoit exe
In this scenario if the cmdline parameter does not have any spaces in the path
it works. i.e. instead of C:\Program Files\Internet Explorer\iexplore.exe
d:\programs\abc.exe was used instead.
oddly enough if I typed the command with path (with spaces and without) in the CMD prompt it works as intended.
It seem like an issue with how sendto supplies the path.
Replying to anonymous:
I'm getting different results from the below two examples
;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)
;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)
;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.
;C:\Program Files\Internet Explorer\iexplore.exe)
comment:3 by , 16 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |

Clarification; this was produced from putting a shortcut into sendto folder where
one could then right click and send .exe to the autoit exe
In this scenario if the cmdline parameter does not have any spaces in the path
it works. i.e. instead of C:\Program Files\Internet Explorer\iexplore.exe
d:\programs\abc.exe was used instead.
oddly enough if I typed the command with path (with spaces and without) in the CMD prompt it works as intended.
It seem like an issue with how sendto supplies the path.
Replying to anonymous: