Forum Discussion

Mrunal's avatar
Mrunal
Contributor
10 years ago
Solved

Is it possible to add Frompath and Topath from DB table variable in aqfilesystems.move method?

Hello,

 

I am trying to call path value from DbTable values. I read one article which says Path requires "string" as its value.

 

 code:- aqFileSystem.MoveFile("C:\\TC", "C:\\TC\\Temp", false))

 

I want to read "C:\\TC" from DBtable. Is it possible?

 

Thanks in Advance.

 

 

 

  • You probably want to do something like

     

      from = KeywordTests.Test1.Variables.DB.Value("A");
      to = "D:\\New folder\\Copy";
      aqFileSystem.CopyFile(from, to, false);

     

     If you've set up your DB to use the first row as the column name, then you'll need to use Value("Path") ,

5 Replies

    • Mrunal's avatar
      Mrunal
      Contributor

      Hi,

       

      My code is

       

      aqFileSystem.CopyFile("KeywordTests.Test1.Variables.DB.Value(A)", "D:\\New folder\\Copy", false)

       

      for excel details see attached screenshot.

       

       

      Error Details :- An error occurred while copying a file (folder). In additional Info it says no file corresponds to - followed by "Test Path".

       

       

       

       

      • You probably want to do something like

         

          from = KeywordTests.Test1.Variables.DB.Value("A");
          to = "D:\\New folder\\Copy";
          aqFileSystem.CopyFile(from, to, false);

         

         If you've set up your DB to use the first row as the column name, then you'll need to use Value("Path") ,