0

I have a list of files, say a, b and c. If I need to concatenate them in that order into a single file, I'd use:

copy /B a+b+c outputfile

How do I do the same if the filenames are in an array? Eg:

set FILE_LIST=(a b c)

I don't want to specify each file name when copying, and wondering if I could just iterate the array and concatenate.

4

1 Answer 1

1

You can achive this by going through a for loop for the file and concatenating/append the files one by one again in another for loop.

List of files in an array: Populating Array in DOS Batch Script

The appending the list of files with a for loop: A command-line or batch cmd to concatenate multiple files

Regards, Vishnu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.