Newbie Simple Script Help

Discuss and share scripts and script files...
TestMeister
Posts: 100
Joined: 04 Feb 2008 20:17

Newbie Simple Script Help

Postby TestMeister » 11 Aug 2018 23:32

For my purposes, the many XY OOB features rarely require any customization beyond user-defined buttons, as a result I have not had the need for scripts. Now, as I try to build my first script, I am having difficulty with interpreting the Help script instructions as to both the type of command I should use and the correct syntax...so, hopefully someone can kindly help and here is what I need-

-I have my main work computer with multiple external drives attached, and my personal computer with its single internal drive
-Each night a backup runs from each machine backing up all drives to a single backup drive
-On the backup, drive I have a separate folder structure for the contents of each drive
-The backup folder for each drive has 3 sub-folders that contain the redundant grandfather-father-son scheme of different backup files for different days
-Every few days, I manually navigate to each folder to verify the backups have run. Instead, I would like to run a script from an XY button that displays this info within the default XY tab in a format something like this where the date-time is last-modified.
-
C:\Backup\
    Drive1\
    BakA\Full.bak...79,950,104...8/8/2018 3:18:10 am
    BakB\Full.bak...79,950,300...8/7/2018 3:22:11 am
    BAKC\Full.bak...79,956,107...8/6/2018 3:20:09 am
    \Drive2\
    BakA\Full.bak...79,950,104...8/8/2018 4:18:10 am
    BakB\Full.bak...79,950,300...8/7/2018 4:22:11 am
    BAKC\Full.bak...79,956,107...8/6/2018 4:20:09 am

Any help much appreciated!

jupe
Posts: 684
Joined: 20 Oct 2017 21:14

Re: Newbie Simple Script Help

Postby jupe » 12 Aug 2018 08:41

Something like this should work, you can narrow the search criteria as you see fit by modifying the first line:

Code: Select all

   goto "c:\backup?agem: < 1 w /types=bak /flatfiles";
   setcolumns("Path,Name,Size,Modified", 16);
   sortby "P", "a";
   sortby "M", "d", 1;

For help on the search parameters you can use, you can paste the following into the XY address bar for more information:

Code: Select all

::help "idh_quicknamesearch.htm";

TestMeister
Posts: 100
Joined: 04 Feb 2008 20:17

Re: Newbie Simple Script Help

Postby TestMeister » 13 Aug 2018 00:44

Thanks but I could not get that script to work, it kept returning a blank tab.

By modifying the Branch View configuration and adding a favorite to my backup folder root, with 2 mouse clicks I can get pretty close. Only issue is there does not seem to be a way to modify the BV column width and as these are large files, the size gets truncated so the columns must be stretched each time.

Thanks for your help!

highend
Posts: 7218
Joined: 06 Feb 2011 00:33

Re: Newbie Simple Script Help

Postby highend » 13 Aug 2018 00:59

Thanks but I could not get that script to work, it kept returning a blank tab


Execute this and show the result:

Code: Select all

   text quicksearch("agem: < 1 w /types=bak /flatfiles", "c:\backup", , "m");
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

TestMeister
Posts: 100
Joined: 04 Feb 2008 20:17

Re: Newbie Simple Script Help

Postby TestMeister » 13 Aug 2018 03:24

The example layout I originally posted was redacted to keep things simple.
Attached is the execution the above script, modified as follows:
-"Type" option removed
-Actual paths used
ScreenHunter 56.png
ScreenHunter 56.png (8.2 KiB) Viewed 70 times
ScreenHunter 57.png
ScreenHunter 57.png (25.75 KiB) Viewed 70 times

jupe
Posts: 684
Joined: 20 Oct 2017 21:14

Re: Newbie Simple Script Help

Postby jupe » 13 Aug 2018 05:06

If you are going to redact relevant information, then you need to understand how to replace it with the correct info.

You have pretty much just written what would make the first script supplied work for you, put the correct root path(s) in, and then either leave out the types switch altogether or change it to tib, both can be achieved by modifying the first line of the script.

PS: If you are on a non-english language of Windows and your columns aren't named the same as in the second line of the script, then they could need modifying too.


Return to “Script Exchange”



Who is online

Users browsing this forum: No registered users and 0 guests