Solution would be using forward slashes in filenames.
WBR,
Ivan.
Since you used double quotes in the echo statement and single quotes in
the let statement, the value is not the same. Either try double quotes
in the let statement too, or 'C:\try this\try.txt' either side.
Note that Vim (even Vim for Windows) knows about forward slashes as path
separators: I would expect filereadable('C:/try this/try.txt') to return 1.
>
> real issue:
> I define a global variable in my vimrc
> if has('win32')
> let g:vimfiles = $HOME.'\vimfiles\'
> endif
> let g:vimfiles = escape(g:vimfiles, ' \')
> so I can use this:
> silent execute 'helptags '.g:vimfiles.'doc'| " Tag help files
> execute 'setlocal tags+='.g:vimfiles.'stltags'| " Add Stl tags
> ....
> it's convenient, but when use
> filereadable(g:vimfiles . "path_to_sth_readable")
> vim return me 0
>
> Does anyone have a good solution to this ? Thanks!
see above
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
174. You know what a listserv is.
WBR,
Ivan.