‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows10

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
yang16
Posts: 41
Joined: Wed Mar 30, 2016 8:28 am America/New_York
Answers: 0

‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows10

by yang16 » Mon May 30, 2022 5:06 am America/New_York

Hello~

I want to download all the URLs in a file called http_manifest.txt using Wget on Windows 10. The file was obtained after ordering VIIRS L2 data from NASA Ocean Color. However, when I ran Wget for one URL using this command: wget https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/requested_files_1.tar?h=ocdist309&p=/data1/7060517533972d6a/requested_files, I got an error as bellow:

I wonder what is 'p'? Does anyone know how to fix this issue?
In addition, is it possible to download all URLs in the http_manifest.txt file using wget?

Thank you in advance.
Elaine.
Attachments
1.JPG
1.JPG (72.09 KiB) Not viewed yet

Tags:

OB.DAAC - amscott
User Services
User Services
Posts: 350
Joined: Mon Jun 22, 2020 5:24 pm America/New_York
Answers: 1
Has thanked: 8 times
Been thanked: 3 times

Re: ‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows1

by OB.DAAC - amscott » Tue May 31, 2022 1:22 pm America/New_York

Can you try the instructions here and let us know if you are able to obtain your files?
https://oceancolor.gsfc.nasa.gov/data/download_methods/#orders_sec

yang16
Posts: 41
Joined: Wed Mar 30, 2016 8:28 am America/New_York
Answers: 0

Re: ‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows1

by yang16 » Tue May 31, 2022 10:20 pm America/New_York

Thank you for your reply. Yes, I tried the instructions in that website. Specifically, when I ran "wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on --no-check-certificate --content-disposition -i https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/requested_files_1.tar?h=ocdist309&p=/data1/7060517533972d6a/requested_files", I got an error as below:
2.JPG
2.JPG (31.48 KiB) Not viewed yet
Do you know how to fix this issue?

Thank you in advance.
Elaine.

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: ‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows1

by gnwiii » Wed Jun 01, 2022 12:37 pm America/New_York

Although they don't seem to mention it, the instructions at <https://oceancolor.gsfc.nasa.gov/data/download_methods/> are for linux or macOS and will need extensive changes for use on Windows. In my experience, there are many versions of wget.exe for Windows, but many are
old or otherwise limited and do not work well. The python script does work reliably on Windows.

Note that you should check the name and permissions of your ".netrc" file.

qinger
Posts: 3
Joined: Tue Mar 31, 2020 5:22 pm America/New_York
Answers: 0

Re: ‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows1

by qinger » Wed Jun 01, 2022 1:20 pm America/New_York

Hi Elaine,

I think you need to configure your username and password for authentication using a .netrc file following the instruction on the following page:
https://oceancolor.gsfc.nasa.gov/data/download_methods/#netrc

Please let us know whether this helps.
Guoqing

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1464
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 5 times

Re: ‘p’ is not recognized as an internal or external command, operable program or batch file when using wget on Windows1

by OB.DAAC - SeanBailey » Wed Jun 01, 2022 3:07 pm America/New_York

Seems the "p" is incorrectly being interpreted as a command line option to wget. Try putting the URL in quotes, e.g.:

wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on --no-check-certificate --content-disposition -i
"https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/requested_files_1.tar?h=ocdist309&p=/data1/7060517533972d6a/requested_files"

Sean

Post Reply