Opening file using Wildcards
Posted: 03 Aug 2012 04:31
batch file wildcards i have to open a file but there are two very similar ones and i only open one.
say i have two documents that are the same like
This_is_a_test_v10.02.03.00.txt
This_is_a_test_v10.02.03.00_hello.txt
i only want to open the top one and not the bottom one.
this is what i have so far
Thank you
say i have two documents that are the same like
This_is_a_test_v10.02.03.00.txt
This_is_a_test_v10.02.03.00_hello.txt
i only want to open the top one and not the bottom one.
this is what i have so far
Code: Select all
For /f "usebackq tokens=*" %%I in (`dir /b /a-d "%filepath%\This_is_a_test*.txt"`) do start notepad "%filepath%\%%I"
Thank you