Char Jackson said:
No, you can do it from anywhere if you specify the full path to the target
file, as in C:\Users\Owner\Records\dir.doc
This is basic DOS; "dir > \records\dir.doc" will get a directory listing
of the directory (folder) you're in when you type it, and will put it in
a file called dir.doc in a folder called records off the root of the
current drive. You add a letter and colon (such as "c:" before the first
"\" if you want to specify a drive other than the one you're on at the
time of issuing. If you leave off the leading \, it will create the file
in a subdirectory called folder from the folder you're in when you call
it up. [Note that I don't think any of these forms will actually create
the folder/directory "records" - they just assume it already exists. I'm
not sure what happens if it doesn't - error message I think.]
Personally I wouldn't use ".doc" for the target filename; what it
creates is a text file, so I'd use .txt if I was going to specify an
extension. .doc implies it's going to be a word-processor file (with
fonts, bold, underline, and so on), which it isn't.
--
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf
.... her greatest triumph to date has been doggy-paddling to each area of the
shipping forecast. - Eddie Mair (on Charlotte Green), Radio Times 13-19
October 2012