• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DOS File Name question

us3rnotfound

Diamond Member
Setup.exe starts, then spawns a new temporary process that invariably begins with "~TMP"____, and closes itself.

For example, that child exe might be called ~TMP2324sdf.exe, or another time it might be called ~TMPsadf3.exe, etc, point is I know it will be ~TMPsomething.

I'm doing a search in the task manager for this ~TMP process, so that when it closes, the batch file will go to the next line. I've got that part down ok, it's just the temporary exe process and how do handle its filename in a search that is throwing me off.

My question is, how do you specify in a batch file a filename if you only know part of it? I've been trawling Google, but with no luck so far, I know it's a fairly common thing to do.

My intuition said to specify set*.exe, and that'd open setup.exe for instance. I know it involves an asterisk at some point, could someone give me a quick hint?

Thanks.
 
You can specify filenames with the asterisk wildcard. In your example, this would be
Code:
copy ~TMP*.exe c:\dest\

As an alternative, you can pipe commands to find if you want to find the specific instances of strings within the output of commands.
Code:
dir | find /i "~TMP"
 
Back
Top