K
K
kirigosh2015-01-07 02:27:50
Programming
kirigosh, 2015-01-07 02:27:50

Is there a program that will copy and number the given text?

Chaotic heading...
Hello!
Given: There is a line my.com/1/100.jpg Needed
: Create a txt document in which lines will be written in each new line

http://my.com/1/100.jpg 
http://my.com/1/101.jpg
http://my.com/1/102.jpg
http://my.com/1/103.jpg  
...
http://my.com/1/250.jpg

Help find solutions. How to organize this? I heard that this can be done using a batch file (.bat), but if there are other options, I will be glad.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2015-01-07
@zmeyjr

habrahabr.ru/post/52871
for Windows google analogues

S
Sergey, 2015-01-07
Protko @Fesor

for /l %x in (1, 100, 250) do echo http://my.com/1/%x.jpg

Something along those lines. There is no Windows at hand, so I'm not sure if it works.

A
Alexander Taratin, 2015-01-07
@Taraflex

@echo off
setlocal EnableDelayedExpansion
setlocal EnableExtensions

del t.txt

set /a i=100
:WHILE_0
if !i! LSS 251 (

  <NUL set /p =my.com/1/>> t.txt
  <NUL set /p =!i!>> t.txt
  echo .jpg >> t.txt
  
  set /a i=^(!i! + 1^)
  goto WHILE_0
)

pause

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question