Hello evryone,
this is KiTiK, i'm new here. And I'm new in batch scripting.
I read how for loop works both typing for /? in dos and in the article on this site.
But I still have some problem to get it entirely.
My purpose is to check if the command tasklist exist, and to do it i wrote this code:
for /f "tokens=1,* delims=;" %%a in ("%PATH%") do (
if exist %%a\tasklist.exe (echo there is) else (echo there is not)
)
this is good if the first entry in %path% is the system32 folder but i would like to check also in the other entries, but i connot understand how to do it without knowing the number of entries. Could you help me to understand it? It's puzzleing me
Another simple question: how can my bat echo accented letters (è, ò, ù) properly? I didn't find a solution searching in google.
Thanks in advance and sorry for my bad English