Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

DOS Syntax question

Jul 10, 2009 11:19PM PDT

It's been so long since I had to use a DOS command to direct a file to a specific location, I may have forgotten the syntax.

I am generating a file inside an older version of Rbase and want to direct it to a file called "madcust" in a directory called "CSV".

To my memory, the command line would be C:\CSV madcust Am I correct? (actually I hope not)

Discussion is locked

- Collapse -
That might work....I'd add a backslash after C:\CSV and add
Jul 11, 2009 12:52AM PDT

an extension to the filename......'txt' or 'csv'.

VAPCMD

- Collapse -
Re: DOS syntax question
Jul 16, 2009 5:05AM PDT

R:Base? Wow! Another old-timer, like myself. It has been... lemmee think... since something like 1987 since I last touched R:Base!

But I digress... sorry.

I'm not sure I understand your question because I don't know what you mean by "direct it to" in this context; but let me see if I can clarify...

You're trying to specify in R:Base where you want the file "madcust" to either be placed, or read from... something like that? And you're simply wondering how to specify that you want it in the...

C:\CSV

...folder... is that it?

If you're specifying a pathname, you can't have any spaces in it.

If you're trying to tell R:Base to either place a file into the C:\CSV folder, or read a file from it, then you must put a backslash between the "CSV" and the filename, to wit:

C:\CSV\madcust

If you're trying to copy "madcust" to the "C:\CSV" folder, from the command prompt, then, assuming you're in the folder where the source copy of "madcust" is sitting (and assuming that that's not the CSV folder), then the COPY command would be:

copy madcust c:\csv

- OR -

assuming you're already on C:, but just down in the folder where the source copy of "madcust" is sitting, then this version of that command would also work:

copy madcust \csv

- OR -

if you're down in a folder one level below CSV (because that's where the source copy of "madcust" is sitting, then this version of that command would also work:

copy madcust ..\csv

The latter two COPY commands contain relative pathing which relies on your being in the right place at the time of command execution in order for it to work. The very first one will always work, no matter where you actually are.

Did that help? Or did I misunderstand (most likely because I didn't really understand what you meant by "direct it to") and so answered unhelpfully?


___________________________
Gregg L. DesElms
gregg@greggdeselms.com
Napa, California

- Collapse -
look here ............ somewhere
Jul 17, 2009 5:21PM PDT