Page 1 of 1

need a script, I think

Posted: 07 Jan 2010 14:22
by little titty
When I download files from the internet they go into a specific folder, which quickly gets quite a few files in it.
Trouble is when i go into that folder to find what I downloaded earlier - its not easy to find.
Does anyone have a scprit that could sort out any files downloaded that day - either highlight them or move them to the top or bottom of the folder so that i can see them easier.
Or does anyone have a better suggestion.
thanks

Re: need a script, I think

Posted: 07 Jan 2010 14:29
by admin
Sort the folder by created date. Save this as FVS for this folder.

Re: need a script, I think

Posted: 07 Jan 2010 14:33
by TheQwerty
Or use Find Files to search for files within your desired date range.
Which can also be saved to a Template for repeated, quick, and scripting access.

Re: need a script, I think

Posted: 07 Jan 2010 14:34
by little titty
Thanks, yes I realize now that using find files works fine and probably dont need a script. Unless people have other ideas.
But for now will follow your good suggestion, thanks

Re: need a script, I think

Posted: 07 Jan 2010 14:59
by Stefan
I have the same need for log files.
admin wrote:Sort the folder by created date. Save this as FVS for this folder.
This was my first intention too, but i wanted to have the files in alphabetic order, so i had an try with this script:

This do highlighting with TAG-#3-color the file modified in the last n minutes.
Maybe you want to see if this is something for you?

There are two settings:
$TAG_color = 3; //highlight with TAG #3 color
$AGE_minutes = 15; //highlight files with mod date older than 15 minutes (was changed to use an input box instead of hard coded value)

Code: Select all

 //SETTINGS:-----------------------------------------------------------------------------------
setting AllowRecursion;  
 global $AGE_minutes, $TAG_color;
 $TAG_color = 3;                                     //highlight with TAG #3 color    
 //$AGE_minutes = 15;                                //highlight files with mod date older than 15 minutes
 $AGE_minutes = input("AGE Highlighter", "Higlight files modified into the last n Minutes", 60); 
 //--------------------------------------------------------------------------------------------
 
 
 self $File, file; setkey $File, "LastScript", "Script", "<xypath>\USER.ini"; //store this xys as last xys for reuse
 
 
 //IF an file is selected THEN start from this file on, ELSE goto file No. 1
 IF (getinfo("CountSelected")<1){ 
    sel 1; //msg "Please selected one file"; sub "_LOOP";
 }else{
    $curitem = "<curname>"; sel a; tag; sel; sel "[$curitem]";  sub "_LOOP";
 } //------------------------------------------------------------------------
 

"_LOOP"                                             //Loop endless, break if reported info is nil
 global $AGE_minutes, $TAG_color;
 While (1){
	 $cur_mdate = report(" {modified}",1);            //get mod date from cur file
	 END ($cur_mdate=='');                            //if mod date is nil end the script

	 $DiffResult = datediff($cur_mdate, , "n");       //diff (mod date <> now) as minutes
	 IF ($DiffResult < $AGE_minutes +1) {
    Tag $TAG_color;
	 }                                                //if diff is as wanted: do smtg
	 sel +1;                                          //select next file
	 sub "_LOOP";                                     //call recursive myself
 }

Re: need a script, I think

Posted: 07 Jan 2010 16:24
by little titty
thanks Stefan will try it out and I could then link it to an icon on the toolbar.

Re: need a script, I think

Posted: 28 Aug 2010 01:22
by SkyFrontier
Fixed version (spacing, only):

Code: Select all

//SETTINGS:-----------------------------------------------------------------------------------
   setting AllowRecursion; 
   global $AGE_minutes, $TAG_color;
   $TAG_color = 3;                                     //highlight with TAG #3 color   
//$AGE_minutes = 15;                                //highlight files with mod date older than 15 minutes
   $AGE_minutes = input("AGE Highlighter", "Higlight files modified into the last n Minutes", 60);
//--------------------------------------------------------------------------------------------


   self $File, file; setkey $File, "LastScript", "Script", "<xypath>\USER.ini"; //store this xys as last xys for reuse


//IF an file is selected THEN start from this file on, ELSE goto file No. 1
   IF (getinfo("CountSelected")<1){
        sel 1; //msg "Please selected one file"; sub "_LOOP";
   }else{
    $curitem = "<curname>"; sel a; tag; sel; sel "[$curitem]";  sub "_LOOP";
   }
//------------------------------------------------------------------------


"_LOOP"                                             //Loop endless, break if reported info is nil
   global $AGE_minutes, $TAG_color;
   While (1){
    $cur_mdate = report(" {modified}",1);            //get mod date from cur file
    END ($cur_mdate=='');                            //if mod date is nil end the script

    $DiffResult = datediff($cur_mdate, , "n");       //diff (mod date <> now) as minutes
    IF ($DiffResult < $AGE_minutes +1) {
    Tag $TAG_color;
    }                                                //if diff is as wanted: do smtg
    sel +1;                                          //select next file
    sub "_LOOP";                                     //call recursive myself
   }