cancel
Showing results for 
Search instead for 
Did you mean: 

Copy File from Stores

TomCBridges
New Contributor

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 6
AlexKaras
Community Hero

RE: Copy File from Stores

Hi Tom,



aqFile.Copy() and aqFile.Rename() functions (see relevant TestComplete help topics for more details). Is this what you were looking for?
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
TomCBridges
New Contributor

RE: Copy File from Stores

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!
TomCBridges
New Contributor

RE: Copy File from Stores

ok, is aqFile only in TC7?
AlexKaras
Community Hero

RE: Copy File from Stores

No, aqFile exists in TC6 as well. What version of TC you are using?
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
TomCBridges
New Contributor

RE: Copy File from Stores

ah, I'm only using 5.



should BuiltIn.CopyFiles work in the same way?
YMinaev
Staff

RE: Copy File from Stores

Hi,



Yes, it will work in the same way.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors