Skip to content

Is there any way to skip over files if there is no difference? #3

@DRosenman

Description

@DRosenman

I created a for loop to new text files with old text files. And my for loop saves each diffr output as an html file. There are over 500 corresponding files that I am checking for differences between the old and new versions... I am hoping that none of the files contain differences. Is there anything I could add to my for-loop to avoid creating html files for files that have no differences?

for(num in filelist) {
         file_a <- paste0('new_files/',num,'.txt')
         file_b <- paste0('old_files/',num,'.txt')
         diff <- diffr(file1= file_a, file2 = file_b)  
         fi <- paste0(num,'.html')
         saveWidget(diff, file=fi)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions