title: How to escape the backslashes and the automatically generated escape character in file path in java
body: <p>I have very small and simple problem but I am not getting solutions on it.
  Actually I am getting a CSV file path using file chooser.
  I am entering the data in this csv file in to database using load data local infile query.</p>
  
  <p>Suppose my entered file path is "C:\title.csv"
  When I put this string in to query the you will see the \t combination in the path. This \t which is actually part of the file path and not the escape character '\t'. But the java and mysql consider it as escape character.</p>
  
  <p>then I tried to replace '\' in the file path string with "\\" using following code line.</p>
  
  <pre><code>String filepath="C:\title.csv";
  String filepath2=filepath.replace("\\","\\\\");
  </code></pre>
  
  <p>Still there is not effect on the file path and it still consider the '\t' as escape character.</p>
  
  <p>So my question is how to solve this problem without changing the name of the file?</p>
  
  <p>If we have path like</p>
  
  <pre><code>String filepath="C:\new folder\title.csv";
  </code></pre>
  
  <p>It will consider the \n and \t as escape character.
  how to solve this problem if the name of the file or folder in path cause for escape character?</p>