This script is used to get the file location from the specified directory's path.
Note:
Please provide a valid path to find the file location.Give the correct file name as well as the directory's name on getFileNameandTargetRootDirectory().
For Example,
getFileNameandTargetRootDirectory('test.txt','c:\\users\\MSD')
It can be run as a System User.