How do I check the length of a filename in batch script?

Microsoft Windows
Post Reply
PiotrMP006
Posts: 19
Joined: 2021-Sep-01, 10:57 am

How do I check the length of a filename in batch script?

Post by PiotrMP006 »

Hi

How do I check the length of a filename in batch script?
User avatar
Simon Sheppard
Posts: 190
Joined: 2021-Jul-10, 7:46 pm
Contact:

Re: How do I check the length of a filename in batch script?

Post by Simon Sheppard »

Assuming you have the full path/filename, then use Parameter Extensions to split out just the filename, or filename+extension.

Then to get the length use Strlen
Post Reply