1

I have a specific requirement that I need to download the RSS feed file (it is in XML format) from the given link using dos command.

I have tried the following command and it keeps giving me syntax error.

E:\>wget -q -o wget.log https://www.myclienturl.com/arcio/factiva/?key=66gpsgbffay1gqybax4rfgiyty6dt09ysdghyhl & ren index.html@key=66gpsgbffay1gqybax4rfgiyty6dt09ysdghyh ProductFeed.xml
The syntax of the command is incorrect.

When I execute the wget command with the url, it is downloaded with the file name as
index.html@key=66gpsgbffay1gqybax4rfgiyty6dt09ysdghyh
and I am trying to rename that to a generic name so that I can use the file for further processing.

Also, I would like to add the following line on top of the downloaded file

<?xml version="1.0" encoding="UTF-8"?>

Please help or suggest any better way of achieving the same or help to identify where I am doing a mistake.

Thanks

1
  • Welcome to superuser.com! In case you find an answer to help solve a problem don't forget to click either the grey ☑ or the up-pointing arrow/triangle to the left of the text.
    – Hannu
    Commented Jan 31, 2021 at 9:34

1 Answer 1

0

UNTESTED, suggested scripting:

Place the first line in a separate file e.g. header.txt

Do wget -q -o wget.log -O download.txt URL... to get the xml from the 'net

Do copy header.txt + download.txt output.xml to create what you need, stored in output.xml

note: this is from memory, so the actual wget and copy options may need to be amended.

wget --help | more - to find out wget options to use.
copy /? or even help copy - for the same w.r.t. copy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .