Forum Discussion
4 Replies
Sort By
- Philip_BairdCommunity ExpertSee
aqFile OpenTextFile method
aqFile has a number of other useful methods for working with files as well - mark_addinallOccasional Contributor
'Create Object
Dim fso,f
Set fso = CreateObject("Scripting.FileSystemObject")
'Open the text file
Set f = fso.OpenTextFile(PathToFile,1,True) - mark_addinallOccasional ContributorIf you want to smply check that the contents of the file are what you expect then you can add the file to your stores container in your test project and use the various methods of comparison available - Files.Compare() comes to mind.
If you want to store the text of the file in memory and do something with it then you will need to have a look at the references for the FileSystemObject I mentioned earlier.
http://msdn.microsoft.com/en-us/library/aa242706(v=vs.60).aspx
or
http://www.w3schools.com/asp/asp_ref_filesystem.asp - bruno_mesquitaNew ContributorHello, I've tried both solutions provided and none of them solve my problem. What I want to achieve is to open the file itself, so that later can perform validations on the content of it. Any idea how can I do this?
Thank you.
Greetings.
Related Content
- 4 years agoTommyTester
- 5 years agoJonathanRoux
- 8 years agoWestManBruce