> From: Sam Habiel <sam.hab...@gmail.com> > 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