Forum Discussion

sergi's avatar
sergi
Contributor
12 years ago

Get all files stored in a folder inside Stores>Files

Hi,

I've got some files in Stores>Files.

To have them a little bit organised I've created folders (virtual folders because physically they are still in the root folder of Files in TestComplete project).



My question is.. Can I somehow get an array with all the files from an specific folder, instead of all the files within Stores>Files as Files.FileNamesList() does?



Thanks.

2 Replies

  • Hi Sergi,

    to my knowledge there is no way to do this. Folders are only for the "by hand" management of the files under TC.



    As workaround I suggest you add a common prefix to the name of the files you want to  get together, but I agree this is not "optimal".



    If there is a suggestion to increase the role of the folder under Stores>Files, I agree to increase its ranking :-).



    Regards,

    Christophe
  • Hi Christophe,



    in my case it would be very useful because there I have, for example, a folder for each version of my test object. Inside each folder there are some files(variable amount and filename for each version).

    Now, in my scripts I have to know the name of each file inside a specific folder.



    Every time I have a new version (thus a new folder) I have to have a hard-coded list of the available files in a particular folder.



    What I want to achieve is to hard-code only the name of the folder and be able to get dynamically the list of files inside a folder.