Gisle, I downloaded it from here: https://eternallybored.org/misc/wget/. It doesn't seem to be MinGW compiled; but I can't tell.
Eli, Holy shit it works! I spent several hours trying different combinations--but never came up with this incantation! Thank you so much! Is there a valid argument to be made that some arguments for wget should not be expanded, like accept and reject? --Sam On Tue, Jun 5, 2018 at 10:33 PM, Eli Zaretskii <[email protected]> wrote: >> From: Sam Habiel <[email protected]> >> Date: Tue, 5 Jun 2018 14:16:27 -0400 >> >> I have a wget command that has a -A flag that contains a wildcard. >> It's '*.DAT'. That works fine on Linux. I am trying to get the same >> thing to run on Windows, but *.DAT keeps getting expanded by wget (cmd >> does no expansion itself). There is no way that I found of suppressing >> that. I think I tried everything: single quotes, double quotes, escape >> * with ^ (cmd escape char), etc. > > What version of Windows is that? > >> For reference, here's the whole command: >> >> wget -rNndp -A "*.DAT" >> "https://foia-vista.osehra.org:443/Patches_By_Application/PSN-NATIONAL >> DRUG FILE (NDF)/PPS_DATS/" -P . >> >> Run it twice on Windows to see the problem. > > Did you try using "*.[D]AT"? > > The problem AFAIK is that C runtime on modern versions of Windows > expands wildcards even when quoted. So either you need to build wget > with wildcard expansion disabled (using the appropriate global > variable whose details depend on whether you use MSVC or MinGW and > which version of MinGW), or you use the above trick (assuming that > wget can expand such wildcards). Disabling expansions altogether is > usually not a good option in this case, since you probably need it > with other use cases. > > HTH
