I need to analyze the XFERLOG log file of all files written to disk and process the specified files using an external script. The problem with XFERLOG is that it replaces all spaces with underscores, and the file name on the disk remains unchanged (as it should be).
If the original file name has a combination of spaces and underscores, this situation makes it difficult to determine the actual file name on the disk, so you would have to go through all permutations of spaces and underscores, check each permutation of the file system again to see if it exists.
So let's say the log file reads this:
/path/to/file/OCD_Nightmare_-_[stuff_here_2].txt
The actual file on disk looks like this:
/path/to/file/OCD Nightmare - [stuff_here 2].txt
There are 2 ^ 5 permutations here. What would be the best way to find the "right" string?
source
share