Link to home
Start Free TrialLog in
Avatar of sunda2010
sunda2010

asked on

how to change file path d:\test.txt to d:\\test.txt

i am getting error for file path
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Avatar of a_b
a_b

Change that to - "d:/test.txt" easiest.
try this
path.replaceAll("\","\\");
@jalpa_144: path.replaceAll("\","\\"); will give compilation error
If you are using an IDE just do a replace - ':\' with ':/'
ASKER CERTIFIED SOLUTION
Avatar of dinhchung82
dinhchung82
Flag of Viet Nam image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial