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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
PiotrMP006
Posts: 29
Joined: 08 Sep 2017 06:10

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

#1 Post by PiotrMP006 » 19 Aug 2022 01:44

Hi

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

penpen
Expert
Posts: 1991
Joined: 23 Jun 2013 06:15
Location: Germany

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

#2 Post by penpen » 19 Aug 2022 02:29

You could store the filename into an environment variable and then check the length of that string using the :strlen-function.

penpen

Post Reply