This post is tested under masOS High Sierra and Julia v1.6.1.

Suppose you have folder named A with following directory tree:

├── B
│   ├── D
│   │   ├── F
│   │   └── YourScript.jl
│   └── E
└── C

Current directory

pwd() # returns “/Users/USERNAME/Desktop/A/B/D”

Or,

@DIR # returns …