cmd - Batch - Right String in foor Loop with variable -


i've little problem right string manipulation in loop. code in question:

set filename=!filename:~0,%lengthtoclip%!

if try without loop or replace variable %lengthtoclip% fix number works fine. need for-loop. processed text file line line, cut out unimportant information (the code fragment) on right side , write in new text file.

my first idea need ist stronger exclamation mark stronger %. i'm newbie batch have no idea how resolve problem. grateful help.

greetings

for %%z in ("!lengthtoclip!") set "filename=!filename:~0,%%~z!" 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -