Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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=http://test.com/picture.swf?id=1 --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=(((http://test.com/picture.swf?id=1))) --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:

open test.com
username
pass
hash
bin
lcd c:\users\***\My Documents
cd public_html/test.com/test
put picture.png
bye
share|improve this question

1 Answer 1

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

 
discard

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.