Search for folders
1. findFolders path:="C:\c";
2. findFolders path:="C:\c" addpath:=1;
Please refer to the page for additional option switches when accessing the x-function from script
Input
string
input path to look for subfolders
int
add root path to all resulting folder or not
Output
output the number of sub folders found
output result file names separated by CRLF
This X-Function is used to search folders in specific path and conditions.
This example shows:
dlgPath;// Open a dialog to pick path. Selected folder name will be saved in path$ type -a "You have choosen " + path$; findFolders;// find subfolders under path specified in path$. All found path will be put to folder$, separated by CRLF, by default full path is not added if(folder.GetLength() < 1) { type "No subfolders found"; break 1; } int nn = folder.GetNumTokens(CRLF); type "$(nn) subfolders found"; string strTemp$; for(int ii = 1; ii <=nn; ii++) { strTemp$ = folder.GetToken(ii, CRLF)$; pe_mkdir strTemp$; //Create these folders under current folder in Project Explorer of Origin. }
FindFiles
Keywords:root, subfolder