findFile(file,root)

Determines the location(s) of a file within a given directory tree.

Find FileFind File


Syntax

o_findFile(file,root)
file: Text - the full name of the file to be found
root: Text - the starting directory to search
return: scalar or array Text - the full path(s) to the file(s) found that match the specified name

Usage

Use this to find any which is in the file system.

Location

menu: veeos ==> Scripting ==> Script-Based Functions ==> Find File

library: scriptLib

Example

The typical usage of findFile occurs when the user knows that a file exists somewhere but is not sure where it is. For instance there may be multiple versions of Python installed and the user wants to find them all.

o_findFile("python.exe","C:\") finds several such files and returns an array
      C:\apps\python3.8\python.exe
   C:\Users\stan\AppData\Local\Microsoft\WindowsApps\python.exe
   C:\Program Files (x86)\Agilent\VEE Pro 7.0\veeos\python\python.exe

Notes

Since a typical system has many files, findFile() may take a long time to execute. If you choose a very general path such as C:\ then the entire file system is searched and all matching files- including those in the Recycle Bin- will be found and reported.

Reference

Dependencies

This function is implemented with a Python script called via scriptPro.

Supported On 

VEE 7.0+, Windows 7+

See Also

which


© 2015-2025. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 03 February 2023 13:04.