Search found 6 matches

by Tom48
25 Nov 2016 15:11
Forum: DOS Batch Forum
Topic: batch file string manipulation in for loop
Replies: 11
Views: 6340

Re: batch file string manipulation in for loop

Sorry, i intended to write this: somehow define the path here: set "defined_path_string=C:\some\path\" loop 1: FOR /R "C:\some\path\" %%G IN (*.txt) DO ... loop 2: FOR /R "C:\some\path\" %%G IN (*.txt) DO ... loop 3: FOR /R "C:\some\path\" %%G IN (*.txt) DO .....
by Tom48
24 Nov 2016 14:01
Forum: DOS Batch Forum
Topic: batch file string manipulation in for loop
Replies: 11
Views: 6340

Re: batch file string manipulation in for loop

Thank you so much for the help! This helped me so much to understand all the expansions and loops. One more question. In case i have some loops that include a path (like in the following). How could i set/define the path into a variable/string at the top so i have to change the path only at the top ...
by Tom48
23 Nov 2016 15:24
Forum: DOS Batch Forum
Topic: batch file string manipulation in for loop
Replies: 11
Views: 6340

Re: batch file string manipulation in for loop

ok, that works extremely well! Thanks a lot! How could i delete the Text File is just zipped? Could i just use the del command in the inner loop? How exactly would u do that? Could you maybe tell me why you are using "tokens=1,2,3*" and "delims=_" ? (what exactly is it doing?) Al...
by Tom48
23 Nov 2016 14:46
Forum: DOS Batch Forum
Topic: batch file string manipulation in for loop
Replies: 11
Views: 6340

Re: batch file string manipulation in for loop

just the same directory, is just fine :)
by Tom48
23 Nov 2016 14:12
Forum: DOS Batch Forum
Topic: batch file string manipulation in for loop
Replies: 11
Views: 6340

Re: batch file string manipulation in for loop

hi, thank you for your fast reply! in my folder there are like 100 text files. They have names like this: 0200_db_off_state_0x201548_5555.txt 0200_db_off_state_0x201548_5556.txt 0200_db_off_state_0x201448_5558.txt 0201_db_on_state_0x201448_5525.txt 0201_db_on_state_0x201448_5535.txt 0201_db_on_state...
by Tom48
23 Nov 2016 13:44
Forum: DOS Batch Forum
Topic: batch file string manipulation in for loop
Replies: 11
Views: 6340

batch file string manipulation in for loop

hi, im pretty new ro batch programming and i just can not get it done. I already spend hours and this so i really hope some of you guys are able to help me out! I have many .txt files in a local folder named like e.g: 0200_some_other_stuff_0x201548_5555.txt Now i would like to zip this files. Heres ...