Creat same text line, but with a different number

August 18, 2012 at 06:24:15
Specs: Windows 7
Hi all, I do not have much knowledge with scripts and ask for your help. I have a file with a list of numbers which looks like below,


I would like to place each number into a text as below, the number would be inserted between the %22...........%22%7D


Any help appreciated.

See More: Creat same text line, but with a different number

Report •

August 20, 2012 at 18:33:49
you have a good work ;) and i have understood that you wanna put the numbers in :

echo "/track.php?zy_track=feed&sendkey=&next_controller=index&next_action=ltest&next_params=%7B%22<<here>>%22%7D
right?? if you wanna to put it any place else just edit %%E and place it anywhere
and so try this one :

for /f "tokens=1-18 delims=," %%a in ("file path and name") do (
for %%E In (%%a,%%b,%%c,%%d,%%e,%%f,%%g,%%h,%%i,%%j,%%k,%%l,%%m,%%n,%%o,%%p,%%q,%%r) Do (
echo "track.php?zy_track=feed&sendkey=&next_controller=index&next_action=ltest&next_params=%7B%22%%E%22%7D" >> "file_output path and name"
echo "/track.php?zy_track=feed&sendkey=&next_controller=index&next_action=ltest&next_params=%7B%22%%E%22%7D" >> "file_output path and name"
echo. >> "file_output path and name"

this my first answer and solution and sorry for my bad english :)
batch still get the power :)

Report •

August 21, 2012 at 04:39:11
:: ===== script starts here ===============
:: bugs.bat 2012-08-21 18:08:05.26
@echo off > newfile & setLocal enableDELAYedeXpansioN

set /p S=< myline
set A=!S:~0,109!
set B=!S:~-6!

for /f "tokens=* delims=," %%a in (nums) do (
call :sub1 %%a
goto :eof

for %%i in (%*) do (
>> newfile echo.!A!%%i!B!
goto :eof
::====== script ends here =================

Life is too important to be taken seriously.


Report •

August 21, 2012 at 21:30:58
@echo off > bugs1& setlocal enabledelayedexpansion
set /p z=<numbers
for %%z in (%z%) do (
set f=0
for /f "tokens=1-8* delims=%%" %%a in (bugs0) do (
if !f! neq 1 (
>>bugs1 echo %%a%%%%b%%%%c%%%%d%%%%e%%22%%z%%%%g%%%%h
set f=1

Report •
Related Solutions

Ask Question