Sign in to follow this  

xp script with adding 1 loop

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Quote:
Original post by blueloon
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.


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.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this