Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore part of file name (usefull for version named files) #993

Open
Messij opened this issue Sep 29, 2021 · 2 comments
Open

Ignore part of file name (usefull for version named files) #993

Messij opened this issue Sep 29, 2021 · 2 comments

Comments

@Messij
Copy link

Messij commented Sep 29, 2021

Consider fileV2021.txt and fileV2022.txt as se same file and compare it
Set V2021 and V2022 as parameter an ignore it in file name comparaison

@nestoroa
Copy link

nestoroa commented Jan 5, 2022

I take evidences from several servers and I'm forced to keep the"timestamps" at the beggining of the name. I have to manually select these pairs of files whenever I have to run the periodical reviews.

For example:

  • 20220105_servername_evidencename.txt
  • 20211205_servername_evidencename.txt

If there is a way to filter-out part of the filename for automatic pairing with regular expressions, that would be absolutely great.

@vertigo220
Copy link

@nestoroa Pretty sure that's not possible, but if you have to do this enough, it might be worth making a quick batch file or ps script to do the regex and make copies of the files stripped of the dates, in new, separate folders and then call winmerge to compare the folders. Alternately, you could just compare them directly using regex in the script. I imagine it would be possible to automate the entire process, so you just run the script and it copies/renames/compares the files, outputs the comparison results to a single text file, then deletes the copies and displays the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants