can something like to following be done?
set FILEID=0
for /f "tokens=*" %%f in (myhosts.txt) do (
%FILEID%=%FILEID% +1
echo do something to host >> %FILEID%.txt
)
incrementing within a loop
Moderator: DosItHelp
Matice,
Try:
DOS IT HELP?
Good job helping out dizze!
Try:
Code: Select all
@echo off
cls
set FILEID=1
for /f "tokens=*" %%f in (myhosts.txt) do (
set /a FILEID+=1
call echo forking tasks for %%f with ID %%FILEID%%
)
DOS IT HELP?
Good job helping out dizze!
set /a FILEID+=1
never heard of such a syntax but that did the trick beautifully, now i can continue without probs! thanks a bunch!!
never heard of such a syntax but that did the trick beautifully, now i can continue without probs! thanks a bunch!!
DosItHelp wrote:Matice,
Try:Code: Select all
@echo off
cls
set FILEID=1
for /f "tokens=*" %%f in (myhosts.txt) do (
set /a FILEID+=1
call echo forking tasks for %%f with ID %%FILEID%%
)
DOS IT HELP?
Good job helping out dizze!