Code: Select all
for /f "delims=" %a in ('URL2FILE http://www.website.com/file.txt ^| findstr /v "linux"') do @%a
Works perfectly fine from the command line, but will fail when I use it in a batch file. :s
Basically it's supposed to fetch the file's contents, and feed them into the variable and the variable is executed as a line of code.
So, for example, I could use this in an simple auto-updator for a program, or client.
This would fetch the code from the file which would instruct the batch file to download the new file version, or the current dependencies.
This could also be used to fetch 'users' from a list.
There are a few other things it could be used for, but they're moot.
Essentially, I'm just looking for some insight as-to why it doesn't seem to work in a batch file.
As well as a fix, if possible.
If not, I'd be immensely appreciative if somebody could provide an ulterior means of accomplishing what I'm aiming for.