|Do you know where your variables are?|
Re^4: Combining filesby vitoco (Friar)
|on Oct 02, 2009 at 13:37 UTC||Need Help??|
AFAIK, wildcards in OS boxes are expanded by programs, not by the shell (cmd.exe) as in *nix. Perl will keep "*" as an argument, and it's illegal as a filename when interpreted by <> operator.
You may consider this:
but it's better to use Win's built-in commands, like TYPE or COPY, as it was already said.
Note that newfile.txt must be empty or must not exists before the FOR, because >> opens it for append on each iteration.
Update: Using globs:
Note: this code has errors, but works as an example.
BTW, it seems that files order is not important.