Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a batch file that looks like this, which takes a picture of a webpage and crops it:

cd C:\users\***\Downloads\IECapt-2008-06-10
IECapt --delay=10000 --url= --out="C:\users\***\My Documents\picture.png"
cd C:\users\***\My Documents
convert picture.png -trim picture.png

ftp -s:place_img.txt

I was wondering is there was a way that I could alter this script to accept user input to replace the URL and the file name with what the user inputted. For example, the user would input a URL and a file name and it would replace these things:

cd C:\users\***\Downloads\IECapt-2008-06-10
IECapt --delay=10000 --url=((( --out="C:\users\***\My Documents\((picture)).png"
cd C:\users\***\My Documents
convert ((picture)).png -trim ((picture)).png

ftp -s:place_img.txt

(((URL being replaced)))

((File name being replaced))

This is the "place_picture.txt" file:

lcd c:\users\***\My Documents
cd public_html/
put picture.png
share|improve this question

Two possibilities come to mind. One, you could easily set your batch file to take arguments from the command line, or two, prompt for user input after the user runs the batch file.

I'm not sure how your place_picture.txt relates to the batch file, but I suspect there will need to be some processing done as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.