Find directories containing certain file
Moderators: Hacker, petermad, Stefan2, white
Find directories containing certain file
I need to search a directory tree recursively for all directories containing a certain file, pass the found directories to the list box and then "pack" using TreeCopyPlus (packer plugin) to copy all these found directories (with all containing files and directory structure considered).
However, there is no simple workflow/solution/plugin to find these directories. Currently, I use the DirSizeCalc content plugin to search for a certain file count, since I know the number if the file to search for exists (and that it is a different number if the file does not exist) and that the file only exists on leaf directories. Is there any better/direct solution?
Sorry, if duplicated issue, but I actually searched the forum and found no acceptable solution so far.
However, there is no simple workflow/solution/plugin to find these directories. Currently, I use the DirSizeCalc content plugin to search for a certain file count, since I know the number if the file to search for exists (and that it is a different number if the file does not exist) and that the file only exists on leaf directories. Is there any better/direct solution?
Sorry, if duplicated issue, but I actually searched the forum and found no acceptable solution so far.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Re: Find directories containing certain file
Thanks. Indeed, that is the kind of plugin I was thinking of. Was not yet aware of the FileInDir content plugin. Let me see if I can make a proper 64-bit version of it.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Re: Find directories containing certain file
Done. FileInDir 2.0.0.1 is released at totalcmd.net.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Re: Find directories containing certain file
Thanks tbeu!
Very much appreceated.
It is possible to store some simple searches in the fileindir.ini file.
Like:
[has_mp3s]
IgnoreCase=1
SearchFile=*.mp3
Is it possible too, to store a more complex search, like this Image: https://imgur.com/HrqDWxe?
If yes, I don't find the syntax in the readme.
I mean, in the fileindir.ini file, not in TC's search, where we surely can store that serach.
I know, you're not the initial dev, but maybe you know it by reading the code :-)
Thanks!
Very much appreceated.
It is possible to store some simple searches in the fileindir.ini file.
Like:
[has_mp3s]
IgnoreCase=1
SearchFile=*.mp3
Is it possible too, to store a more complex search, like this Image: https://imgur.com/HrqDWxe?
If yes, I don't find the syntax in the readme.
I mean, in the fileindir.ini file, not in TC's search, where we surely can store that serach.
I know, you're not the initial dev, but maybe you know it by reading the code :-)
Thanks!
Was nützt der Löffel für die Weisheit, wenn man zu weit vom Suppentopf entfernt sitzt?
Mario
Mario
Re: Find directories containing certain file
Yes, can do.versalzen wrote: 2020-10-11, 11:14 UTC It is possible to store some simple searches in the fileindir.ini file.
Like:
[has_mp3s]
No, this it not possible since the current plugin implementation relies on FindFirstFile, which can take wildcard characters as question mark or asterisk, but no regular expressions.versalzen wrote: 2020-10-11, 11:14 UTC Is it possible too, to store a more complex search, like this Image: https://imgur.com/HrqDWxe?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Re: Find directories containing certain file
Very simple:
1) search for the file (ALT+F7)
2) put the resulting list in one of the panels
3) select in the other panel the directory where the zip file should be
4)select all the files and use the key ALT+F5
5)Give the zip file a name and the files are copied complete with the structure.
1) search for the file (ALT+F7)
2) put the resulting list in one of the panels
3) select in the other panel the directory where the zip file should be
4)select all the files and use the key ALT+F5
5)Give the zip file a name and the files are copied complete with the structure.
Re: Find directories containing certain file
Hi @tbeu
What is the scope of DirSubdirs property? Does it only search if folders contains subfolder? Is it possible to check for deeper level?
What is the scope of DirSubdirs property? Does it only search if folders contains subfolder? Is it possible to check for deeper level?
Re: Find directories containing certain file
@solid No it is not a recursive search, just for direct subdirectories.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more