I have a scenario where I need to download the files, which can be of any file extension (.xlsx, .pdf, .tif, .doc, etc).
I need to specify the file name in advanced
Next I need to check if the that file is present in the folder or not using the same File name, but as I am not sure of file extension, then it is always giving as “No file Exists”.
I tried using — path.fileNameWithoutExtension, but still getting the same result.
I know the naming convention by which I need to save the file, but not the extension, so I am saving the file by this (without specifying the type of file extension, which is been taken automatically)
But I need to check the existence of file name using “Path exists”, I don’t want to give the extension to check its existence.