Here's the latest problem I am trying to overcome with x2...
How can I get a list of all the top level directories in say C:\temp\ where no files or directories (at any depth) have been modified within the last month?
My best shot is to search recursively for all Folders modifed within the last month. I can then export the full names of the search results to another program and remove all the non-top level directories and all the duplicates. This isn't too bad since I can sort them based on their path prior to exporting. Once this is finished I have to manually select these directories in x2, invert the selection, and voila; done.
Can anyone think of a better method? I'm still discovering the power of the scrap frame. Thanks for any help you can provide.
FYI, some future features that may aid this process:
- Allow selecting files in a scrap frame based on the full path (not just name). For example select "C:\temp\*\" to only select those directories that are in C:\temp.
- Allow selecting files that appear in a text file
Challenge....
Moderators: fgagnon, nikos, Site Mods
I don't know what you want to do with those 'top level' folders when you've established which ones obey the rule you specify, but here's an alternative which seems simpler.
Let's assume your looking for folders on drive C:\ which have unchanged files/folders for the previous month (from the root)
- You display C:\ in a X2 pane
- hit Ctrl+F to open the search dialog and specify an additional rule
- in the rule definition window, choose the Modified [S] (stock) column
- select 'During the previous' and set to 1 month
- Be sure to select the radio button 'Not' in the boolean context section!
- confirm through 'ok' button. Search dialog should now show a rule 'Modified date within last 1 month(s)', prefixed with a 'Not' icon (binoculars with underlined red 'not' underneath)
- hit 'ok' button in search dialog
scrap container should fill with files and folders matching the rule you specified (files/folders NOT modified n the last month)
- when finished, sort on the 'path' column to get the items in the root folder at the top
- to get rid of most of the files you can use a filter (Ctrl+H). Specify *. (notice the dot!) as filter mask.
Now you should have only folders and files which have no extension in the list. This makes it easy to identify the folders you want.
NOTE: the filter trick doesn't work for all folders and files, because you can also have folders with extensions (or at least a dot somewhere in the name). So be careful with this!!
I think you can do almost anything you'd want to do with the folders from the scrap container itself. So there is no need to go and select these items again in a normal X2 pane. But as I said, I'm not sure what you want to do with the folders you identified this way.
Maybe you could elaborate on that?
Let's assume your looking for folders on drive C:\ which have unchanged files/folders for the previous month (from the root)
- You display C:\ in a X2 pane
- hit Ctrl+F to open the search dialog and specify an additional rule
- in the rule definition window, choose the Modified [S] (stock) column
- select 'During the previous' and set to 1 month
- Be sure to select the radio button 'Not' in the boolean context section!
- confirm through 'ok' button. Search dialog should now show a rule 'Modified date within last 1 month(s)', prefixed with a 'Not' icon (binoculars with underlined red 'not' underneath)
- hit 'ok' button in search dialog
scrap container should fill with files and folders matching the rule you specified (files/folders NOT modified n the last month)
- when finished, sort on the 'path' column to get the items in the root folder at the top
- to get rid of most of the files you can use a filter (Ctrl+H). Specify *. (notice the dot!) as filter mask.
Now you should have only folders and files which have no extension in the list. This makes it easy to identify the folders you want.
NOTE: the filter trick doesn't work for all folders and files, because you can also have folders with extensions (or at least a dot somewhere in the name). So be careful with this!!
I think you can do almost anything you'd want to do with the folders from the scrap container itself. So there is no need to go and select these items again in a normal X2 pane. But as I said, I'm not sure what you want to do with the folders you identified this way.
Maybe you could elaborate on that?
Dumb questions are the ones that are never asked
Jan, a couple of suggestions (but I am not sure if that is a correct solution):
1. If you deselect "files" checkbox, you will get only folders in the search. No need to purge the files afterwards.
2. I think (not sure) that when any of the files inside a folder changes, the folder's own modified date also gets updated. (My logic is, when would otherwise a folder's last modified date get changed?)
1. If you deselect "files" checkbox, you will get only folders in the search. No need to purge the files afterwards.
2. I think (not sure) that when any of the files inside a folder changes, the folder's own modified date also gets updated. (My logic is, when would otherwise a folder's last modified date get changed?)
Hmmm, I thought of that too and it is a very simple and nice solution, no doubt.
But it all depends what you are searching for. Because the folders date/time gets updated too if you copy a file in from another location! The timestamp of the file itself remains unchanged. Suppose the file you copied is a very old file (>> 1 month unchanged). Then if you really look for files folders which have a timestamp older than a month, your approach won't work, because the folder it was copied into has an updated timestamp!
But if you are only looking for folders without any change in the last month, your suggestion is GOLD
But it all depends what you are searching for. Because the folders date/time gets updated too if you copy a file in from another location! The timestamp of the file itself remains unchanged. Suppose the file you copied is a very old file (>> 1 month unchanged). Then if you really look for files folders which have a timestamp older than a month, your approach won't work, because the folder it was copied into has an updated timestamp!
But if you are only looking for folders without any change in the last month, your suggestion is GOLD
Dumb questions are the ones that are never asked
that makes sense if you consider the folder as a "list of contents", that must change when you rename
it works as you say for NTFS but for FAT32 it doesn't!
to recap dir modification dates are affected:
so FAT32 are totally useless!
it works as you say for NTFS but for FAT32 it doesn't!
to recap dir modification dates are affected:
Code: Select all
Copy/Move/Delete Rename Modify(edit)
NTFS v v x
FAT32 x x x
Thanks for the responses, heres some more details
JRz asked what I was trying to do. I have a directory of projects and I want to find which projects (directories) I haven't touched in the last month so I can archive them and remove them. Hope this gives you some context.
This explains why the solution presented doesn't work. It will identify files or folders that haven't been modified, but NOT folders where its entire contents (including subfolders) have not been modified. This is why my original solution used the inverse solution; that is find all top level folders that have had any of their contents modified and then invert the selection. Note the subtle but significant difference in the results.
I have been using the folders only search option because, as youve notice, the NTFS file system is kind enough to update this whenever anything changes in the directory (but only in the immediate directory; not subdirectories).
Thanks for the brain-power anyhow.
JRz asked what I was trying to do. I have a directory of projects and I want to find which projects (directories) I haven't touched in the last month so I can archive them and remove them. Hope this gives you some context.
This explains why the solution presented doesn't work. It will identify files or folders that haven't been modified, but NOT folders where its entire contents (including subfolders) have not been modified. This is why my original solution used the inverse solution; that is find all top level folders that have had any of their contents modified and then invert the selection. Note the subtle but significant difference in the results.
I have been using the folders only search option because, as youve notice, the NTFS file system is kind enough to update this whenever anything changes in the directory (but only in the immediate directory; not subdirectories).
Thanks for the brain-power anyhow.