Page 1 of 1

Newbie Simple Script Help

Posted: 11 Aug 2018 23:32
by TestMeister
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!

Re: Newbie Simple Script Help

Posted: 12 Aug 2018 08:41
by jupe
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";

Re: Newbie Simple Script Help

Posted: 13 Aug 2018 00:44
by TestMeister
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!

Re: Newbie Simple Script Help

Posted: 13 Aug 2018 00:59
by highend
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");

Re: Newbie Simple Script Help

Posted: 13 Aug 2018 03:24
by TestMeister
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 1861 times
ScreenHunter 57.png
ScreenHunter 57.png (25.75 KiB) Viewed 1861 times

Re: Newbie Simple Script Help

Posted: 13 Aug 2018 05:06
by jupe
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.