Concatenation of CSDBE Files

Discussions about tools to complement CSPro data processing
Forum rules
New release: CSPro 8.0
Post Reply
Cbms123
Posts: 1
Joined: November 4th, 2022, 11:03 pm

Concatenation of CSDBE Files

Post by Cbms123 »

HI im new here, can anyone help me on how to concatenate maybe 100 files without typing the password repeatedly. Thanks. Im using the Concatenate Data of CSPRO. :D :D :D :D :D :D
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Concatenation of CSDBE Files

Post by Gregory Martin »

Your best option is to either add the password to the files listed in a PFF: https://www.csprousers.org/help/CSConca ... nates.html

Or to do this in logic. For example, this would concatenate a single file:
fileconcat(DICT_NAME, "out.csdb", "input.csdbe|password=1234");
If you had a whole directory of files, you could do something like this:
// get a list of files from the Input Data folder
List string input_files;
dirlist(input_files, "Input Data", filter := "*.csdbe");

// add the password
do numeric ctr = 1 while ctr <= input_files.length()
    input_files(ctr) = input_files(ctr) + "|password=1234";
enddo;

// concatenate
fileconcat(DICT_NAME, "out.csdb", input_files);
Post Reply