How to open file without knowing extension in powerbuilder 12.6

457 views Asked by At

I need to open a file without knowing its extension in powerbuilder 12.6. I already have the path without extension file. Example : Path/file(no extension)

1

There are 1 answers

0
Cristhopher Mancilla On BEST ANSWER

I found the solution to my problem. I only have the string that contains the path and the name of the file(without extension). For example: path = "C:APPLICATIONS/FOLDER1", FILENAME = "TEST123" So, the function dirlist can search inside the directory defined and store that coincidence(s) in a listbox. listbox1.dirlist(path + "" + filename + "") This function search all the coincidences inside the path with the filename specified and stores in the listbox. It works as the "%" + @stringtofind + "%" in sql. Then, it is simple to search your full filename (with the extension) in the listbox. Finally, use execute shell function choosing your full filename.