Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hi to all
#1
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 Sad
Do Someone explain how use it please?
Many thanks in advance for any help or info
#2
Macro Macro25
Code:
Copy      Help
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"
#3
Hi Bk Smile
thank you very much for the code


Forum Jump:


Users browsing this thread: 1 Guest(s)