Hello I cannot put the drive
letter in this:
File workingdir = new File(System.getenv("SystemDrive")+":/Users/"+System.getProperty("user.name")+"/AppData/Local/Google/Chrome/User Data/Default");
This is not working, however this is working:
File workingidr =new File("C:/Users/"+System.getProperty("user.name")+"/AppData/Local/Google/Chrome/User Data/Default");
I cannot hard code the drive
letter, since it will run on multiple computers. Thank you for your help guys.
This is because System.getenv("SystemDrive")
returns "C:" not "C", so change your code to this:
File workingdir = new File(System.getenv("SystemDrive")+"/Users/"+System.getProperty("user.name")+"/AppData/Local/Google/Chrome/User Data/Default");
Also you could replace
System.getenv("SystemDrive")+"/Users/"+System.getProperty("user.name")
with this:
System.getProperty("user.home")
Hope this helped.