ValueError: No escaped character for python shlex.split
<p>I have a string as follows</p>

<pre><code>mystring1=xcopy /Q /Y d:\\Program Files\\TestData\\*.* c:\\Program Files\\TestData\\Company name\\
mystring2=xcopy '/Q' '/Y' 'd:\tj\tjData\\' "c:\Program Files\TestData\\Company name\\"
</code></pre>

<p>I used shlex module as follows </p>

<pre><code>mylist1=shlex.split(mystring1) 
mylist2=shlex.split(mystring2) 
</code></pre>

<p>but I am getting an error:</p>

<pre><code>ValueError: No escaped character
</code></pre>

<p>mylist1 value should be <strong>[xcopy,/Q,/Y,d:\Program Files\TestData\,c:\Program Files\TestData\Company name\]</strong></p>

<p>and </p>

<p>mylist2 value should be <strong>[xcopy,/Q,/Y,d:\tj\tjData\,c:\Program Files\TestData\Company name\]</strong></p>
