Reputation: 11
My requirement is to copy text file from one folder to another in windows OS using jmeter. So how can we achieve this using jmeter?
Please help!
Thanks, Abhishek
Upvotes: 0
Views: 2126
Reputation: 168157
You can do it in at least 2 ways:
Using OS Process Sampler configured like:
The faster (and cross-platform) way would be using JSR223 Sampler and the code like:
def sourceFile = new File('c:/somefolder/source_file.txt')
def destinationFile = new File('c:/someotherfolder/destination_file.txt')
destinationFile << sourceFile.text
See Groovy is the New Black for more information on using Groovy scripting in Jmeter tests.
Upvotes: 1