Posts: 2
Threads: 1
Joined: Feb 2017
Hi forum, I'm a new qm user, I started to study QM and I need a little help about how to check if a file exists, on help I found only the #FileExists command but i don't undertand how to use
Do Someone explain how use it please?
Many thanks in advance for any help or info
Posts: 151
Threads: 90
Joined: Aug 2014
Macro
Macro25
out
str file.expandpath("$desktop$\Data\Downloads\a.mp4")
str folder.expandpath("$desktop$\Data\Downloads\")
;fileexists 1
if(FileExists(file))
,out "found"
else
,out "notfound"
;fileexists 2
int fexists = FileExists(file 1)
;out fexists
if fexists= 1
,out "found"
else if fexists = 0
,out "notfound"
;folderexists 1
if(FileExists(folder 1))
,out "found"
else
,out "notfound"
;folderexists 2
int folderexists = FileExists(folder 1)
;out folderexists
if folderexists = 2
,out "folder found"
else
,out "notfound"
;file or folder exists
if(FileExists(folder 2));;or if(FileExists(file 2))
,out "found"
else
,out "notfound"
Posts: 2
Threads: 1
Joined: Feb 2017
Hi Bk
thank you very much for the code