How to replace backward slash to forward slash using java?

Viewed 97866

I'm importing a CSV file to MySQL database. This can be done using java.mysql support for forward slash in file path. If user gives the path

c:\upload\date\csv\sample.csv

MySQL doesn't support this type of path pattern. I want to search for backslashes in the path and replace them with a forward slash, to give this:

  c:/upload/date/csv/sample.csv

How is that done?

3 Answers
Related