Skip to content
Prev 156985 / 398506 Next

How to convert backslash to slash?

It probably depends on how you are prompting the user for input.  Here
is what happens with 'readline' and you will see that the string after
input does have the backslashes escaped.
Input File: c:\dir1\dir2\file.name
[1] "c:\\dir1\\dir2\\file.name"
[1] "c:/dir1/dir2/file.name"

        
On Wed, Sep 24, 2008 at 8:53 AM, Shengqiao Li <shli at stat.wvu.edu> wrote: