clear;
clc;

dataset_dir = 'Datasets_Ascii/' ; %' '; % sigal 13.8.12 
output_dir = 'output3/'
files = [dir(strcat(dataset_dir,'graph_32.txt'))];% sigal 13.8.12 
numNodes = 32;

for i = 1:size(files,1)
    file = files(i).name;
    [graph] = LoadAsciiGraph(dataset_dir, file, numNodes, output_dir);
    [edges] = SaveAsciiGraph(strcat(dataset_dir,output_dir), file, graph);
    
    date_now = clock;
    date_now = strcat(num2str(date_now(1)),'_',num2str(date_now(2)),'_', num2str(date_now(3)),'_', num2str(date_now(4)), num2str(date_now(5)),'_', num2str(date_now(6)));
    out_file = sprintf('res_%s_%s.mat', file, date_now);
    if  strcmp(dataset_dir,' ')== 0 ||  strcmp(output_dir,' ')== 0
        out_file = strcat(dataset_dir, output_dir, out_file);
    end
    save(out_file);
    
end