TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


engine:import:setvar2file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
engine:import:setvar2file [2020/03/04 00:23] Scott Cunliffeengine:import:setvar2file [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 11: Line 11:
 ''SetVar2File(varname, filter, field, offset);'' ''SetVar2File(varname, filter, field, offset);''
  
-//string varname;//\\ +^ Variable ^ Type ^ Description ^ Min Length ^ Max Length ^ Min Value ^ Max Value ^ 
-//string filter;//\\ +|varname| String | The name of the local variable that is to be set.| 1 | 16 
-//string field;//\\ +|filter| String | A filter that matches the file that you want to select.| 1 | 256 
-//int offset;//\\ +|Field| String | The field to pre-sort the selected pathnames before selection (NAME, CREATION, LASTACCESS, LASTWRITE or SIZE).| 1 | 16 
- +|offset| Integer | The offset within the sorted list to select. 1 is the top, 2 is the second from the top, -1 is the bottom, -2 is 2nd from the bottom.| 1 | 11 | -214748364 | 2147483647 |
-|varname| The name of the local variable that is to be set.| +
-|filter| A filter that matches the file that you want to select.| +
-|Field| The field to pre-sort the selected pathnames before selection (NAME, CREATION, LASTACCESS, LASTWRITE or SIZE).| +
-|offset| The offset within the sorted list to select. 1 is the top, 2 is the second from the top, -1 is the bottom, -2 is 2nd from the bottom.|+
  
 ===== Example ===== ===== Example =====
Line 25: Line 21:
 Set variable MYFILE to the smallest text file in C:\stuff. Set variable MYFILE to the smallest text file in C:\stuff.
  
-<sxh>+<code>
 SetVar2File(MYFILE, "C:\stuff\*.txt", SIZE, -1); SetVar2File(MYFILE, "C:\stuff\*.txt", SIZE, -1);
 WriteMsg("The smallest file is $MYFILE"); WriteMsg("The smallest file is $MYFILE");
-</sxh>+</code>
  
 {{tag> import_engine sync_engine}} {{tag> import_engine sync_engine}}
engine/import/setvar2file.1583281400.txt.gz · Last modified: 2025/01/21 22:07 (external edit)