It worked!
Thanks
Search found 2 matches
- 17 Feb 2013 12:10
- Forum: DOS Batch Forum
- Topic: Getting the file extenseion
- Replies: 2
- Views: 2076
- 17 Feb 2013 09:53
- Forum: DOS Batch Forum
- Topic: Getting the file extenseion
- Replies: 2
- Views: 2076
Getting the file extenseion
In at .BAT file, to get a file extension I am doing this:
for %%1 in (file_name.ext) do set ItemExt=%~x1
But that keeps the dot so the extension comes out ".ext". I want it to be just "ext".
Is there a way?
for %%1 in (file_name.ext) do set ItemExt=%~x1
But that keeps the dot so the extension comes out ".ext". I want it to be just "ext".
Is there a way?