This code works, however the folder i’m using creates 2 files every time a process occurs. It just so happens that the file i need comes right after the file i done need :(.
Is there anyway to give me the last modified file with a name of X?
Something like this.
names of files whose (modification time of it = (maximum of modification times of files of folder “/usr/BOSS/pollecr/sosdata/”) and whose (name of it contains “hme”)) of folder “/usr/BOSS/pollecr/sosdata”
names of files whose (name of it as lowercase contains "hme" AND modification time of it = (maximum of modification times of files whose (name of it as lowercase contains "hme") of folder "/usr/BOSS/pollecr/sosdata/")) of folders "/usr/BOSS/pollecr/sosdata/"
Essentially we need to put your two conditions in the first whose clause – we can’t just chain whose with an and.
Unfortunately this returns an “expression could not be parsed” error
Q: names of files whose (name of it contains “hme” and modification time of it = (maximum of modification times of files whose (name of it contains “hme”) of folder “/usr/BOSS/pollecr/sosdata/”) of folder "/usr/BOSS/pollecr/sosdata/"
E: This expression could not be parsed.
@strawgate’s approach is correct (should include the additional filter in the existing whose clause). Can you try the following?
names of files whose (name of it as lowercase contains “hme” AND modification time of it = (maximum of modification times of files whose (name of it as lowercase contains “hme”) of folder “/usr/BOSS/pollecr/sosdata/”)) of folders “/usr/BOSS/pollecr/sosdata/”