I am trying to figure out how I can move, copy, delete and otherwise manipulate physical files on my hard drive. I have a large number of tests that download into my C:\Users\username\Downloads folder from Chrome and I need to be able to move them into a more appropriate folder for test results. Any ideas?
Hi @Dave Weil.
I was able to do this with a Custom Keyword.
See the code below:
@Keyword
def moveDataFileToProcessed() {
File file = new File(“C:\\Projects\\PolicyCreate\\PolicyCreate\\Document\\NewPolicy.xlsx”)
File dir = new File(“C:\\Projects\\PolicyCreate\\PolicyCreate\\Processed”)
boolean fileMoved = file.renameTo(new File(dir, file.getName()))
_}
_