1

I am trying to create a new file on my desktop with the path "Users/username/Desktop/file.txt" but when I try to compile my code I get an error but if I use "../../file.txt" it works fine.

How would I get this to work from the "Users" path?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
meme
  • 27
  • 8
  • 1
    share some code and what errors You are encountering? Do not write Your code here in comments rather put update Your Question with code and error. – Tahir Hussain Mir Jan 01 '17 at 10:32

1 Answers1

3

Try to add / before the path:

"/Users/username/Desktop/file.txt"

That worked for me

hasan
  • 23,815
  • 10
  • 63
  • 101