Escape Character for % in Bash prompt

0

I have a bat file Sig.Bat containing :

rdiff.exe -b 10240 signature 'D:/test/NZ 100% Pure/ABC.txt' 'D:/test/NZ 100% Pure/ABC.txt.DSS'

I excute Sig.Bat with command

bash -l -c '"D:/test/Sig.bat"'

I Get following Error and no file is created.

librsync: ERROR: (rs_file_open) Error opening "D:/test/NZ 100/test/NZ 100 Pure/ABC.txt.DSS" for read: No such file or directory

Whereas if I remove the % sign from folder and bat file then the Signature file gets created.

user1018822

Posted 2019-04-08T18:48:14.233

Reputation: 1

Answers

0

Cygwin doesn't understand windows file paths. You can use the cygpath utility to get the corresponding cygwin names:

cygpath 'D:/test/NZ 100% Pure/ABC.txt'

choroba

Posted 2019-04-08T18:48:14.233

Reputation: 14 741