BBC BASIC for Windows
General >> General Board >> COPY won't work without an extension
http://bb4w.conforums.com/index.cgi?board=general&action=display&num=1416484395

COPY won't work without an extension
Post by KenDown on Nov 20th, 2014, 10:53am

Does anyone have any ideas?
I have a file called "0" or "japan" or whatever; the point is that there is no file extension. If I try OPENIN or OPENUP or *COPY they all fail, usually with a "File not found" error. Yet if I drag the file from one place to another it happens perfectly.

I've tried enclosing the file name is doublequotes, but it makes no difference.

Any ideas how to get the file fo *COPY from location A to location B?

Thanks.
Re: COPY won't work without an extension
Post by sbracken on Nov 20th, 2014, 12:46pm

Hi Ken,

If you check the manual for the *COPY command

http://bbcbasic.co.uk/bbcwin/manual/bbcwin8.html#copy

you will find the follwowing (also present in the manual under the entries for OPENIN, OPENOUT and OPENUP):

"the filename extension defaults to .BBC if omitted. To specify a filename with no extension, add a final full-stop. "

So all you need to do is add a full stop.

Simon
Re: COPY won't work without an extension
Post by Edja on Nov 20th, 2014, 12:50pm

The manual says :
Quote:
If the extension is omitted, .BBC is assumed. To specify a filename with no extension, add a final full-stop.
Have you taken into account that OPENIN, if no extension is specified, will be looking for a file with extension .BBC unless you've added a final full-stop ?

Eddy
Re: COPY won't work without an extension
Post by KenDown on Nov 20th, 2014, 6:28pm

Bah!

And thanks. I must have read that a dozen times and it went completely over my head.