Search by Fileversion.
Posted: 11 Jun 2009 23:50
Is there a way to specify a file version to a search?
Thanks.
Thanks.
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
admin wrote:No, currently not.
Is this the type of thing that could be available via Report/scripting? Similar to the new JPG fields?admin wrote:No, currently not.
j_c_hallgren wrote:Is this the type of thing that could be available via Report/scripting? Similar to the new JPG fields?admin wrote:No, currently not.
Yes, it's related. I would add the query to the Name field in Find Files, e.g.j_c_hallgren wrote:Is this the type of thing that could be available via Report/scripting? Similar to the new JPG fields?admin wrote:No, currently not.
Code: Select all
Name: version:3.5*Code: Select all
//Input file version
input $userinput, "Enter the fileversion you are looking for?", "7.90.0418";
//Remove any clipboard items
copytext;
//Show all items in branch
#263;
//Remove old filters
filter;
sortby path, a;
sel 1;
//Determine fileversion of current file
$fileversion = <curver>;
//Count total items in list
$items= getinfo (CountItems);
$count=1;
$matchcount=0;
$found=0;
// Loop checks if end of list has reached
WHILE ($count < $items) {
//Loop checks for fileversion match
WHILE ($userinput == $fileversion) {
//copy matched name to clipboard
copytext "<curname>|", a;
//select next item
sel +1;
$fileversion = <curver>;
//Increment number
incr $matchcount;
incr $count;
}
sel +1;
$fileversion = <curver>;
incr $count;
}
//Copy clipboard to variable
$found= <clipboard>;
//Check if any files found
IF ($found == "") {
status "No files found",,alert;
}
ELSE {
filter $found;
status "$matchcount file(s) with fileversion "$userinput" found";
}
I am glad you like it, I just get curious when someone asks if this or that can be done. For me its just a way to learn to program and what better way than XY scripting?j_c_hallgren wrote:Serendipity: Saw your script and for someone who's not much into scripting, you've seemed to make your code nice and readable with the layout and comments so just wanted to say thanks, ok?