# MacFile Input in Java

#### thefil

##### macrumors newbie
Original poster
I'm coming from a Windows environment and I have a bit of a file input problem...

Code:
``glass = new Scanner( new File("\Users\filipkrynicki\Mydia 4.0\build\classes\mydia40\db.m4"));``
returns an error "illegal escape character"

*edit* I fixed that problem by doubling the \\s, but now it can't find the file. Am I doing something wrong?

#### itickings

##### macrumors 6502a
My guess would be the use of \ instead of /.

To avoid this kind of problem, consider using File.separator instead of assuming a specific separator.