After writing out a file I want to know where it is, if i use dir i get the files in the current folder but i just want the current folder and dirname is a little obscure
Assuming
C\foldername\subfolder1
\subfolder2
\subfolder3
\file1
\file2
If r is running in sub folder 3 I will get
[1] "file1"
[2] "file2"
I want a command that will tell me C:\foldername\subfolder3