Author Topic: Help! My QB64 .bas files in QB64 folder has changed  (Read 1524 times)

0 Members and 1 Guest are viewing this topic.

Offline Donald Foster

  • Newbie
  • Posts: 63
    • View Profile
Help! My QB64 .bas files in QB64 folder has changed
« on: November 24, 2018, 08:41:07 pm »
To all,

I don't think we have a help section.

So, you'll get a laugh out of this. Instead of opening up QB64.exe and loading my .bas file from that method, I double clicked on my .bas file inside my qb64 folder and all my .bas files changed to Adobe Acrobat Document. I can still load them in QB64.exe program ok, but I would like to change them back to .bas, so I can properly post them. Like here.

Thank you very much and I'm using Windows 7

Donald

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Help! My QB64 .bas files in QB64 folder has changed
« Reply #1 on: November 24, 2018, 09:02:32 pm »
Right click on one of the files.
Select "Open with..." from the menu.
Choose QB64.exe as the file to associate with the file.
Select "Always use this program to open these files..."
Click "OK" (or Done, or whatever it is)

You've now changed your default file association.  (And, you can use this method for ANY file extension on your drive, so you can set QB64 to open *.BI and *.BM files by default as well.)

***********

If it actually changed the extension, and not just the association (if it was somehow changed oddly enough), then you'd need to write a quick program to change the extension back.  Something similar to the following would work:

SHELL "DIR *.AAD>temp.txt" 'whatever the Adobe extension actually is.
Open "temp.txt" for input as #1
DO
   LINE INPUT text$
   Parse for filename/extension...
   Strip off the extension
   RENAME filename$ to filename$ + ".BAS"
LOOP UNTIL EOF(1)
« Last Edit: November 24, 2018, 09:10:16 pm by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Help! My QB64 .bas files in QB64 folder has changed
« Reply #2 on: November 25, 2018, 10:49:58 am »
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/