Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open a file with wildcard
#1
I have on my desktop the file "C:\Users\Alan\Desktop\conexion sai.rdp" and only exists one file with that extension.
I plan to install this macro on many computers that also have an this file but the name will be different. And I have tried things like:


Code:
Copy      Help
If(!FileExists("$desktop$\*.rdp"))

mes- "File does not exists" "Error" "x"
;;_________________________________ or
If(!FileExists("$desktop$\"*".rdp"))

mes- "File does not exists" "Error" "x"

Could you please tell me the correct syntax
#2
dir supports wildcard

if(!dir("$desktop$\*.rdp"))
#3
(04-19-2018, 06:31 PM)Gintaras Wrote: dir supports wildcard

if(!dir("$desktop$\*.rdp"))

Thank you  Heart
#4
I have another doub, what can I do to open that unknown unique file with extension .rdp  Huh


Code:
Copy      Help
something like this:

run dir("$desktop$\*.rdp")


sorry for the inconvenience, am a newbe  Confused
#5
(04-19-2018, 09:08 PM)apeso Wrote: I have another doub, what can I do to open that unknown unique file with extension .rdp  Huh


Code:
Copy      Help
something like this:

run dir("$desktop$\*.rdp")


sorry for the inconvenience, am a newbe  Confused


__________________________________________________________________________________
[quote pid='31140' dateline='1524172082']
Found the answer Wink


Code:
Copy      Help
def ubicacion_acceso_a_escritorio_remoto dir("$desktop$\*.rdp")
if(!ubicacion_acceso_a_escritorio_remoto)
mes- "No existe acceso directo a escritorio remoto en el escritorio." "Error" "x"
run F"$desktop$\{ubicacion_acceso_a_escritorio_remoto}"


[/quote]


Forum Jump:


Users browsing this thread: 1 Guest(s)