Syntax
Metasyntactic symbols
https://en.wikipedia.org/wiki/Backus-Naur_Form
[] optional item
() group items
* item may appear zero or more times
+ item may appear one or more times
| separates alternative items
Useful Pages
Basic Items
https://github.com/taers232c/GAMADV-XTD3/wiki/Basic-Items
List Items
https://github.com/taers232c/GAMADV-XTD3/wiki/List-Items
Drive File Selections
https://github.com/taers232c/GAMADV-XTD3/wiki/Drive-File-Selection
Useful Options
When copying or moving files, the ones in the Bin may cause an error or you may not want to copy/move them. Add excludetrashed to the end of the command to prevent this.
Search Syntax
https://github.com/taers232c/GAMADV-XTD3/wiki/Command-Line-Parsing#list-quoting-rules
Examples of regular expressions
Special Characters
Some characters my affect outcome of the search. This example allows GAM to search for file names starting with 'GAM |' for example in the command;-
gam user <User Email Address> print filelist filenamematchpattern "^GAM\ \|.*" filepath fields id,name,webviewlink todrive
From ChatGPT.
Breaking down the regular expression '^GAM\ \|.*':
1. '^' - Anchors the match at the beginning of the string.
2. 'GAM' - Matches the literal characters "GAM".
3. '\' - Escapes the following character. In this case, it's escaping the space character following it.
4. '\|' - Matches a literal space character followed by a literal pipe character ('|'). The space is escaped with a backslash.
5. '.*' - Matches any character (except for a newline) zero or more times. The '.' represents any character, and '*' means zero or more occurrences.
In summary, the regular expression is designed to match a string that starts with "GAM |" at the beginning, where the space before the pipe is considered part of the pattern. After the pipe, it can have any characters (including none) due to the '.*' part.
Example of matching strings:
"GAM | anything here"
"GAM |"
"GAM |123"