Search for Folders which contain specific file
Posted: 02 Sep 2013 12:05
I want to search folders which contain "readme.txt", I want that search results page show me "Folders" not readme.txt files
thanks in advance
thanks in advance
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
Thanks for your fast reply, But I don't want to copy folders, I want to list them so I can add labels or comments or batch rename them.admin wrote:Copy Containing Folders can be used for this. See http://www.xyplorer.com/release_11.60.htm#v0200
Code: Select all
"1 Collect items : collect"
$SelectedItemsPath= getinfo ("SelectedItemsPathNames", "|")."|";
$CountSelectedItems= getinfo ("CountSelected");
set $Items, $SelectedItemsPath;
incr $Count, $Count, $CountSelectedItems;
$T="";
$i = 1;
while ($i < $Count+1) {
$file=gettoken($SelectedItemsPath,$i,"|");
$q = getpathcomponent( "$file", "path");
$p = getpathcomponent( "$file", "file");
$file=$q . <crlf>;
$A= strpos("$file", "\", -1);
$Zfile = substr("$file", 0, $A);
$b = "ReadMe"; // you can change comment here
tag "$b",$q , 2;
$Tfile = "; sel""[$q]"", ,1" ;
writefile("<xyscripts>\temp.xys", "No.$i $p" goto "$Zfile"$Tfile<crlf>,"a");
$i++;
}
"2.load " load "<xyscripts>\temp.xys";
"3.Delete temp.xys" delete 0, 0, "<xyscripts>\temp.xys";