Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I validate if a fileformat exists on a folder
#1
Have tried to do something like this when I have at least a file with .dll extension:
 
Code:
Copy      Help
if("D:\Harvest\02_GVP_IVRIntelPiloto (Piloto)\PGVITPL.21.12.06.1746 F-118933 - Copy\*.dll")
    out "exists"
else
    out "don't exists"


But it outs "exists" despite I have moved all .dll files to somewhere else .
#2
use Dir instead

like this
Code:
Copy      Help
Dir d
if d.dir("D:\Harvest\02_GVP_IVRIntelPiloto (Piloto)\PGVITPL.21.12.06.1746 F-118933 - Copy\*.dll") ;;if file exists
,out "exists"
else
,out "doesnt"
#3
Thank you, that worked locally but,

I have noticed that if I try to validate a file in a folder shared by a server like: \\##.###.##.##\anything\0001_SUV_RB_CAT_TIPO_PRODUCTO_MI.sql

The result is "doesnt" even though it exists... then tried to opening the file with:
Code:
Copy      Help
run "\\##.###.##.##\anything\0001_SUV_RB_CAT_TIPO_PRODUCTO_MI.sql"

And it appeared a user form asking for credentials, after inform credentials, have tried to validate again and works with "exists". Is there a way to use the current user session in order to avoid to have a user instance with access privileges to the folder for Quick Macros?
#4
Try to run the macro/function as non-admin. 
see this post for an explanation
https://www.quickmacros.com/forum/showth...9#pid23039


Forum Jump:


Users browsing this thread: 1 Guest(s)