Link to home
Get AccessLog in
Avatar of shragi
shragiFlag for India

asked on

get real path

I had the below folder structure

Main_Project_folder
  -> Content
       -> old_content
            -> file2.txt
  -> file2.txt

i.e., in main project folder there is a folder content and a file file2.txt and in that content folder there is a folder old_content and in that there is a file with same name file2.txt

to get file2.txt
I wrote in the below way
String path= request.getRealPath("//file2.txt");

how to write for getting file2.txt in the old_content folder

I tried in the below way but it is still pointing file2.txt
String scpath = request.getRealPath("//Content//old_content//file2.txt");
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access