Page 1 of 1

Search by Fileversion.

Posted: 11 Jun 2009 23:50
by timhatz
Is there a way to specify a file version to a search?

Thanks.

Re: Search by Fileversion.

Posted: 12 Jun 2009 07:27
by admin
No, currently not.

Re: Search by Fileversion.

Posted: 12 Jun 2009 07:43
by timhatz
Thank you for the reply... It would be benificial for me, to have version searching, and a 'column' to show file versions...

Thanks for your time.
admin wrote:No, currently not.

Re: Search by Fileversion.

Posted: 12 Jun 2009 07:56
by j_c_hallgren
admin wrote:No, currently not.
Is this the type of thing that could be available via Report/scripting? Similar to the new JPG fields?

Re: Search by Fileversion.

Posted: 12 Jun 2009 08:13
by timhatz
I just bought the program a few days ago, so I'm not sure what type of options are available to me. And scripting is still new for me.

As for a report, it would be easier, if there was a way to pop-up a window, like notepad that shows the results of the report. Instead having to launch notepad, and then paste it. Is there a way to do this?
j_c_hallgren wrote:
admin wrote:No, currently not.
Is this the type of thing that could be available via Report/scripting? Similar to the new JPG fields?

Re: Search by Fileversion.

Posted: 12 Jun 2009 08:18
by admin
j_c_hallgren wrote:
admin wrote:No, currently not.
Is this the type of thing that could be available via Report/scripting? Similar to the new JPG fields?
Yes, it's related. I would add the query to the Name field in Find Files, e.g.

Code: Select all

Name: version:3.5*

Re: Search by Fileversion.

Posted: 12 Jun 2009 23:48
by serendipity
@Timhatz: This is not a straight forward script but does the job pretty well. It will search the current folder and filter the files with the fileversion you are looking for:

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";
   }

Re: Search by Fileversion.

Posted: 12 Jun 2009 23:53
by j_c_hallgren
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? 8)

Re: Search by Fileversion.

Posted: 12 Jun 2009 23:56
by serendipity
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? 8)
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?