Is it possible to run a script on the search results tab?
Example, If I perform a "Date" search for any file that was modified within the past 30 hours.
And now, for each file in the results list, I'd like perform some actions. (Source)
Copy it to a different location (Destination), ONLY if the (Source) last modified date is newer than the (Dest).
Run script on Search Results Tab?
-
EnjoyRC
- Posts: 101
- Joined: 08 Nov 2010 21:54
Re: Run script on Search Results Tab?
Man, they XYplorer is absolutely amazing. I can do anything with it!!!
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: Run script on Search Results Tab?
Do an right click on an file or an selection -on the result tab- and chose an option.EnjoyRC wrote:And now, for each file in the results list, I'd like perform some actions.
Did this help?
EDIT
Ooh, we are in "Script Exchange" and you want to run an script on the search result tab?
Yes, you can.
Test this:
- search a few files
- when the search results are shown,
---- select an file
---- open "Scripting > Run Script..."
---- and paste this script into the dialog
Code: Select all
while(1)
{
msg "<curname>",1;
sel +1; end ("<curname>"=="");
}
Last edited by Stefan on 09 Nov 2010 20:38, edited 1 time in total.
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Run script on Search Results Tab?
Choose one.EnjoyRC wrote:Man, they XYplorer is absolutely amazing. I can do anything with it!!!
(A)You figured out how to do it?
(B)You are displaying your amazement for XY?
(C) Both
-
EnjoyRC
- Posts: 101
- Joined: 08 Nov 2010 21:54
Re: Run script on Search Results Tab?
(B)... he he he.. I'm gonna try the scripting on Results now.serendipity wrote:Choose one.EnjoyRC wrote:Man, they XYplorer is absolutely amazing. I can do anything with it!!!
(A)You figured out how to do it?
(B)You are displaying your amazement for XY?
(C) Both
-
EnjoyRC
- Posts: 101
- Joined: 08 Nov 2010 21:54
Re: Run script on Search Results Tab?
Thank you so much for your responses...
I can see how it cycles through each selected file name. Yet, how can I access the other columns? Path, size, dates, etc... I'd need to append Path and Name to get the true file path. And as described above, I'm wanting to do some calculations on the file dates.
Also, you need to be careful which way you mark the files. It starts with the boxed one. Not just the first selected.
Mark
I can see how it cycles through each selected file name. Yet, how can I access the other columns? Path, size, dates, etc... I'd need to append Path and Name to get the true file path. And as described above, I'm wanting to do some calculations on the file dates.
Also, you need to be careful which way you mark the files. It starts with the boxed one. Not just the first selected.
Mark
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: Run script on Search Results Tab?
>Yet, how can I access the other columns? Path, size, dates, etc...
Open Help > "Advanced Topics > User-Defined Commands" and take an look at "XYplorer Native Variables"
Try this script:
msg "<curpath> - <cursize> - <datem yyyymmdd_hhnnss>";
Or take a look at "Scripting Commands Reference" and there report() command.
>I'd need to append Path and Name to get the true file path.
Exchange "<curname>" with "<curitem>" in my example script.
>And as described above, I'm wanting to do some calculations on the file dates.
Take a look at "Scripting Commands Reference" and there datediff() command.
>Also, you need to be careful which way you mark the files.
>It starts with the boxed one. Not just the first selected.
Depends on your needs and your description what you want to do. Then the script can follow your wish.
If you need help on this - just ask with an exact description what the script should do.
There are enough coders here to aid you getting started.
.
Open Help > "Advanced Topics > User-Defined Commands" and take an look at "XYplorer Native Variables"
Try this script:
msg "<curpath> - <cursize> - <datem yyyymmdd_hhnnss>";
Or take a look at "Scripting Commands Reference" and there report() command.
>I'd need to append Path and Name to get the true file path.
Exchange "<curname>" with "<curitem>" in my example script.
>And as described above, I'm wanting to do some calculations on the file dates.
Take a look at "Scripting Commands Reference" and there datediff() command.
>Also, you need to be careful which way you mark the files.
>It starts with the boxed one. Not just the first selected.
Depends on your needs and your description what you want to do. Then the script can follow your wish.
If you need help on this - just ask with an exact description what the script should do.
There are enough coders here to aid you getting started.
.
-
EnjoyRC
- Posts: 101
- Joined: 08 Nov 2010 21:54
Re: Run script on Search Results Tab?
Thank you, Thank you.. this defintely points me in the right direction.Stefan wrote:>Yet, how can I access the other columns? Path, size, dates, etc...
Open Help > "Advanced Topics > User-Defined Commands" and take an look at "XYplorer Native Variables"
Try this script:
msg "<curpath> - <cursize> - <datem yyyymmdd_hhnnss>";
Or take a look at "Scripting Commands Reference" and there report() command.
>I'd need to append Path and Name to get the true file path.
Exchange "<curname>" with "<curitem>" in my example script.
>And as described above, I'm wanting to do some calculations on the file dates.
Take a look at "Scripting Commands Reference" and there datediff() command.
>Also, you need to be careful which way you mark the files.
>It starts with the boxed one. Not just the first selected.
Depends on your needs and your description what you want to do. Then the script can follow your wish.
If you need help on this - just ask with an exact description what the script should do.
There are enough coders here to aid you getting started.
.
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Run script on Search Results Tab?
FYI, such a functionality is built in, you don't need to script this. Loop up the Help for "Backup"...EnjoyRC wrote:Is it possible to run a script on the search results tab?
Example, If I perform a "Date" search for any file that was modified within the past 30 hours.
And now, for each file in the results list, I'd like perform some actions. (Source)
Copy it to a different location (Destination), ONLY if the (Source) last modified date is newer than the (Dest).
FAQ | XY News RSS | XY X
-
EnjoyRC
- Posts: 101
- Joined: 08 Nov 2010 21:54
Re: Run script on Search Results Tab?
Oh yeah... Guess what I just found? Rich Copy That's the ticket Don... Been a long time since I found a new piece of software that was gonna find it's way into most of my development tasks that I do each day.admin wrote:FYI, such a functionality is built in, you don't need to script this. Loop up the Help for "Backup"...
XYplorer Beta Club