Search found 2 matches
- 11 Feb 2014 08:43
- Forum: DOS Batch Forum
- Topic: How to check file name from prefix
- Replies: 2
- Views: 1431
Re: How to check file name from prefix
Good!! Thank you very much indeed for your suggestion and for the quick reply.
- 11 Feb 2014 04:04
- Forum: DOS Batch Forum
- Topic: How to check file name from prefix
- Replies: 2
- Views: 1431
How to check file name from prefix
Hi All, I need to rename a file if it exists with a prefix (i.e. "MORE****.txt"). More exactly in my code @echo on FOR /F %%i in ('dir %DIRINPUT%MORE*.txt /B') do ( IF %ERRORLEVEL% EQU 0 ( echo file found set FILENAME=%%i ) else ( echo ERROR: file not found ) ) I want to avoid the system e...