Forum Discussion

TomCBridges's avatar
TomCBridges
New Contributor
14 years ago

Copy File from Stores

Hi All,



this may seem like a really simple task, but it's confusing the hell out of me!



Basically, I want to copy a file from the Stores to a specific location (using VBScript).



there are 6 txt files in Stores->Files.



I have a function where one of the files names is passed into the function.



At this point, I want to copy the specified File from the stores to a specific location (i.e. "C:\Temp\").



I then want to rename the file (i.e. change from to .ini - currently they each have different suffixes)



Any help provided would be great!



Thanks,

Tom

6 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Tom,



    aqFile.Copy() and aqFile.Rename() functions (see relevant TestComplete help topics for more details). Is this what you were looking for?
  • I've tried using the line:



    Call aqFile.Copy("C:\MyFolder\MyFile.txt",
    "C:\TempFolder\")



    But all I get is a Microsoft VBScript runtime error "Object Required: 'aqFile'



    I must be missing something!
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    No, aqFile exists in TC6 as well. What version of TC you are using?
  • ah, I'm only using 5.



    should BuiltIn.CopyFiles work in the same way?