I haven't used much of the special abilities the program has, hopefully I'll pick it up in time with usage.
I am wondering how to search for files that were modified after a specific file was created.
(Use case is quickly backing up my wife's laptop by 7z-ing the files changed since the last 7z of changes was made, with adhoc omissions, which I then copy onto my own computer.)
Cheers, David
Files modified after some file's creation date
-
- Posts: 504
- Joined: Thu Dec 15, 2016 9:44 pm
Re: Files modified after some file's creation date
To find files/folders modified after a specific date/time:
dm:>=2023-01-25T201844
Date Syntax
dm:
To find files/folders modified after the date created of a specific file:
You'll need Everything 1.5.
dm:>=[get-date-created:"c:\windows\notepad.exe"]
where c:\windows\notepad.exe is the specific file.
[get-date-created:"c:\windows\notepad.exe"] is replaced with the date created of the specified file.
[get-date-created:]
dm:>=2023-01-25T201844
Date Syntax
dm:
To find files/folders modified after the date created of a specific file:
You'll need Everything 1.5.
dm:>=[get-date-created:"c:\windows\notepad.exe"]
where c:\windows\notepad.exe is the specific file.
[get-date-created:"c:\windows\notepad.exe"] is replaced with the date created of the specified file.
[get-date-created:]
-
- Posts: 504
- Joined: Thu Dec 15, 2016 9:44 pm
Re: Files modified after some file's creation date
Thank you void!
Is there actually a way to abstract it a bit more, so
"Files modified after the creation date of the latest-created 7z in a particular folder"
In other words, instead of specific file, an Everything sorted-search could be used ("7z files in a folder, latest at top") and the top item of that result picked off for its attribute (create date) that's then used as the value for the dm:>= ?
David
Is there actually a way to abstract it a bit more, so
"Files modified after the creation date of the latest-created 7z in a particular folder"
In other words, instead of specific file, an Everything sorted-search could be used ("7z files in a folder, latest at top") and the top item of that result picked off for its attribute (create date) that's then used as the value for the dm:>= ?
David
Re: Files modified after some file's creation date
The following will give you a list of all the latest created 7z files for each folder:
ext:7z sort:path;dc distinct:path
I'm not 100% sure what you are trying to do with this information.
Would you limit the dm: search to the folder and subfolders where the 7z file was located?
You would have to manually perform the dm: search for each 7z file:
Use the following search if you would like to limit the results to the folder or subfolder where the 7z file is located:
ancestor:[pathpart:clipboard:] dm:>=[get-date-created:clipboard:]
Unrelated:
:clipboard: in phpbb ==
ext:7z sort:path;dc distinct:path
I'm not 100% sure what you are trying to do with this information.
Would you limit the dm: search to the folder and subfolders where the 7z file was located?
You would have to manually perform the dm: search for each 7z file:
- Open a new Everything window and set the search to:
dm:>=[get-date-created:clipboard:] - Back in the previous window with your 7z files, copy each file to the clipboard.
- The other window will update in real-time showing files modified after the creation date of the 7z file in your clipboard.
Use the following search if you would like to limit the results to the folder or subfolder where the 7z file is located:
ancestor:[pathpart:clipboard:] dm:>=[get-date-created:clipboard:]
Unrelated:
:clipboard: in phpbb ==
Re: Files modified after some file's creation date
He wants to get the dc: of the most recently created 7z archive of his wife's documents. Since each periodic archive will have a different filename, he cannot bookmark a search that utilizes the dc: of the most recent 7z for searching for new files the wife created since the previous archive was performed. So, he needs a way to replace the "notepad.exe" in your earlier example with "wife-files-[newest-dc:].7z" for his Everything bookmark.
Re: Files modified after some file's creation date
You would need to do a two-pass search:
First search for your wifes 7z backup files, eg:
"c:\backup\" *.7z sort:date-created
Copy the latest file to the clipboard and search for:
dm:>=[get-date-created:clipboard:]
Consider adding these as bookmarks Under Bookmarks -> Add to bookmarks....
Consider the following BAT file:
ES
First search for your wifes 7z backup files, eg:
"c:\backup\" *.7z sort:date-created
Copy the latest file to the clipboard and search for:
dm:>=[get-date-created:clipboard:]
Consider adding these as bookmarks Under Bookmarks -> Add to bookmarks....
Consider the following BAT file:
Code: Select all
FOR /F "tokens=* USEBACKQ" %%F IN (`es.exe "c:\backup\" *.7z -n 1 -sort dc`) DO (
SET latest7z=%%F
)
ECHO %latest7z%
es.exe dm:^>=[get-date-created:"%latest7z%"]
-
- Posts: 504
- Joined: Thu Dec 15, 2016 9:44 pm
Re: Files modified after some file's creation date
Thanks void, and interesting use of the clipboard: concept.
So it seems it hasn't got subquery facility where it can pick off the top result of a search (perhaps a pre-calculating function with a search-string and field to return could do it).
I think as well as those suggestions a VBS script that scans the folder for the latest 7z and launches Everything with a search using the 7z it finds, or of course save each 7z mini-backup with the current TS but after copying always rename it to a fixed name for Everything to use for next time.
Many thanks, David
So it seems it hasn't got subquery facility where it can pick off the top result of a search (perhaps a pre-calculating function with a search-string and field to return could do it).
I think as well as those suggestions a VBS script that scans the folder for the latest 7z and launches Everything with a search using the 7z it finds, or of course save each 7z mini-backup with the current TS but after copying always rename it to a fixed name for Everything to use for next time.
Many thanks, David