Good Morning Guys,
I’m trying to look for a file and then also I need to know the date of the file if found.
I have this, but I’m getting that its an incompatible type.
Q: if(exists files ("AppData\Local\Programs\composer-launch-pad\resources\app.asar.unpacked\app\extern\windows\screen-rec\IntegratedScreenRec.exe") of folders of folders "C:\Users") then (modification time of file ("AppData\Local\Programs\composer-launch-pad\resources\app.asar.unpacked\app\extern\windows\screen-rec\IntegratedScreenRec.exe") of folders of folders "C:\Users") else ("File Not Found")
E: Incompatible types.
For If Then Else the Then and the Else much have the same object type.
If <boolean> then <string> else <string>
If <boolean> then <time> else <time>
If <boolean> then <file> else <file>
Just turn your Time object into a String object and you should be all set.
Q: if(exists files ("AppData\Local\Programs\composer-launch-pad\resources\app.asar.unpacked\app\extern\windows\screen-rec\IntegratedScreenRec.exe") of folders of folders "C:\Users") then (modification time of file ("AppData\Local\Programs\composer-launch-pad\resources\app.asar.unpacked\app\extern\windows\screen-rec\IntegratedScreenRec.exe") of folders of folders "C:\Users" as string) else ("File Not Found")
A: File Not Found
There is a “slicker” trick to trap the missing file error. The PIPE | functions as limited if/then/else
q: modification time of file"AppData\Local\Programs\composer-launch-pad\resources\app.asar.unpacked\app\extern\windows\screen-rec\IntegratedScreenRec.exe" of folders of folders "C:\Users" as string|"File Not Found"
A: File Not Found
3 Likes
Thank you my friend. This is good to know
so is there a way to get of current logged in user?