Author Topic: Open an exe with a varying name  (Read 895 times)

aliensojurner

  • Newbie
  • *
  • Posts: 1
Open an exe with a varying name
« on: April 08, 2022, 08:05:59 AM »
I am trying to find a way to run an exe in a folder, that is the only exe in the folder, but gets updated with a new version number several times a day. Is there some way to look in a folder and launch any exe in that folder. Considering it's always only one, it could be a wildcard or something.

I realize this may not even be possible, but I'm hoping someone might have a workaround if so.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Open an exe with a varying name
« Reply #1 on: April 08, 2022, 09:10:35 AM »
Powershell can be utilized for this, E.G.
Code: [Select]
Run application 'powershell' -with parameters '-command start $(ls \"C:\My Folder\\\"*.exe | % |{$_.FullName|})' (hidden)