I am trying to detect the existence of file
function find_host_dbx(file_name)
local host_dbx_found=io.open(file_name, "r")
if host_dbx_found==nil then
host_dbx_found=file_name .. " ... Error - File Not Found"
else
host_dbx_found=file_name .. " ... File Found"
end
return host_dbx_found
end
print(find_host_dbx("C:\\Users\\%username%\\AppData\\Local\\Dbox\\host.dbx"))
it seem I can’t do it like that.
can someone help me please
when I replace %username% by the computer user’s name it works