Forum Discussion

KSQian's avatar
KSQian
Contributor
7 years ago
Solved

How do I add folder to script?

I want to add an entire folder to my script folder. 

 

But add existing item only seem to take individual files.

 

So I need to create a folder in TC and move the files into the folder.

 

Pretty boring task every time i need to create a new project... 

 

Am I missing something simple?

  • The folders that you see in a project are not actual directory paths on the hard drive.  They only serve as a visual organization within TestComplete.  There is no correlation between those folders and what you see on the drive.  So, you can't add a "folder" to a project.

     

    HOWEVER... if you select "Add -> Existing Item" and then, in the dialog that comes up, either "shift click" or "ctrl-click" to multi select several script files, TestComplete will add multiple files to a project at a time.  They do need to be actual files, not folders, but multi-select is supported

8 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    The folders that you see in a project are not actual directory paths on the hard drive.  They only serve as a visual organization within TestComplete.  There is no correlation between those folders and what you see on the drive.  So, you can't add a "folder" to a project.

     

    HOWEVER... if you select "Add -> Existing Item" and then, in the dialog that comes up, either "shift click" or "ctrl-click" to multi select several script files, TestComplete will add multiple files to a project at a time.  They do need to be actual files, not folders, but multi-select is supported

    • KSQian's avatar
      KSQian
      Contributor

      Thanks.

       

      Yah that sucks. I know they handle the tree structure in scripts with some other file. Why not support folders? 

       

      For a very modularized svn directory its a pain to add them all to scripts with the same structure.

       

      I have around 10 folders/subfolders...

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Sounds like a feature request to me. :)

         

        Suggestion... if you have that much "shared" code, have you considered converting them to Script Extension RunTime objects so you don't have to bother with adding them to every project every time?