Modify ↓
Opened 5 years ago
Closed 4 years ago
#3836 closed Bug (Fixed)
FileExists with trailing quotation mark
| Reported by: | Owned by: | Jon | |
|---|---|---|---|
| Milestone: | 3.3.15.5 | Component: | AutoIt |
| Version: | 3.3.15.4 | Severity: | None |
| Keywords: | FileExists | Cc: |
Description
Mentioned here first:
https://www.autoitscript.com/forum/topic/206186-fileexists-with-trailing-quote/
For some reason FileExists is treating paths that end with a quote mark (or multiple marks) as valid.
; Assuming File.txt exists:
ConsoleWrite(FileExists('File.txt')) ; Returns 1
ConsoleWrite(FileExists('"File.txt"')) ; Returns 0
ConsoleWrite(FileExists('"File.txt')) ; Returns 0
ConsoleWrite(FileExists('File.txt"')) ; Returns 1
ConsoleWrite(FileExists('File.txt""')) ; Returns 1
Attachments (0)
Change History (4)
comment:1 by , 5 years ago
comment:3 by , 4 years ago
* ? < > " are wildcards. The results are expected if you consider what " does.
View https://docs.microsoft.com/en-us/archive/blogs/jeremykuhne/wildcards-in-windows
comment:4 by , 4 years ago
| Milestone: | → 3.3.15.5 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [12628] in version: 3.3.15.5
Note:
See TracTickets
for help on using tickets.

The following functions all behave similarly (ignoring the trailing quotation marks and returning valid results):
FileGetAttrib, FileGetLongName, FileGetShortName, FileGetSize, FileGetTime
FileGetVersion behaves expectedly, returning "0.0.0.0"