3

In the context of The directory where your SQL scripts are. Defaults to .\ does .\ represent the directory you are currently in?

What about ..\?

What about SET DIR=%~d0%~p0%

Sam
  • 15,336
  • 25
  • 85
  • 148
  • What is the full context? Is that on a line by itself? or preceding a command? How is it used? – abelenky Sep 18 '13 at 20:18
  • 1
    `.` is current directory. `..` is parent directory. You can also append the backslash. In context, with a following path or name, of course you need the backslash (e.g., `..\foo`). – lurker Sep 18 '13 at 20:20
  • Please see my edit above. – Sam Sep 18 '13 at 20:20
  • 1
    @Sam yes, either, really. The `.` and `..` are the directory names, but you can also refer to them as ".\" and "..\". – lurker Sep 18 '13 at 20:22
  • @ Sam See http://stackoverflow.com/questions/112055/what-does-d0-mean-in-a-windows-batch-file – 0xcaff Sep 18 '13 at 20:22
  • possible duplicate of [What does "./" (dot slash) refer to in terms of an HTML file path location?](http://stackoverflow.com/questions/7591240/what-does-dot-slash-refer-to-in-terms-of-an-html-file-path-location), http://stackoverflow.com/questions/5398451/relative-include-files, http://stackoverflow.com/questions/13921252/why-doesnt-dot-dot-slash-work-in-my-root-directory, http://stackoverflow.com/questions/6331075/why-do-you-need-dot-slash-before-script-name-to-run-it-in-bash. Google `dot dot slash` for more. – Mike B Sep 18 '13 at 20:29

1 Answers1

6

does .\ represent the directory you are currently in?

Yes.

What about ..\?

The parent directory

What about SET DIR=%~d0%~p0%

MS docs

Set the environment variable DIR to the drive and path of the batch file.

Kevin Stricker
  • 17,178
  • 5
  • 45
  • 71