I was trying to create a program to read a CSV
file from the downloads folder on any windows computer and could not get the Java BufferedReader
to find the file.
I read that java can handle absolute paths so I did:
File f = new File("%systemdrive%\\users\\%username%\\Downloads\\quotes.csv");
BufferedReader br = new BufferedReader(new FileReader(f));
This threw an IOException with the message :
%systemdrive%\users\%username%\Downloads\quotes.csv (The system cannot find the path specified)
I made sure that this file existed by entering the same path into File Explorer
and easily enough, the file showed up.
I was wondering if something like this is possible and if there is some way to find and read this file.
Thank you for any help!