Ask coding questions

← Back to all posts
Solved : How to locate files in folders???
RomanKubiv (2) (a test repl in which i was trying to figure this out)

how do you reference files from within your code?
eg (the link above) how would i print out the contents of the file called File???

(ik this is realy simple but i cannot find the answer anywhere and the built in repl manual doesent help.)


Edit : add a dot to the begining of your path. Eg ". //folder//file

gautam235 (0)

Have you found a solution to this?

madmonster (29)

Maybe python files can only open files in its directories?

Geocube101 (623)

That's almost correct. Your using the wrong slash.
Should be / not \