Public Group

# xp script with adding 1 loop

This topic is 4105 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I've no experience with scripts, but I need one to take a url and add 1 to a numbered directory in a url address each time the file is run. The url is http://www.twis.org/audio/podpress_trac/web/147/0/TWIS_2007_09_11.mp3 I need the 147 to increase by 1 each time it's run and print the new url inside the file. would TWIS_$(year)_$(month)_\$(day).mp3 work as far as the changing title of the mp3? I'm not sure if this can be done with a .cmd file, but it needs to be able to launch the program wget. Thanks for your help!

##### Share on other sites
Quote:
 Original post by blueloonHi, I've no experience with scripts, but I need one to take a url and add 1 to a numbered directory in a url address each time the file is run.

You need to remember the number between runs of the script. The usual way to do this is to have it stored in a file: make the script read the number out of the file, add 1, use that number, and then write it back into the file.

The details depend on what language you're using. I've never heard of a '.cmd' file.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633709
• Total Posts
3013481
×