QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Donald Foster on November 24, 2018, 08:41:07 pm

Title: Help! My QB64 .bas files in QB64 folder has changed
Post by: Donald Foster 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
Title: Re: Help! My QB64 .bas files in QB64 folder has changed
Post by: SMcNeill 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)
Title: Re: Help! My QB64 .bas files in QB64 folder has changed
Post by: Pete on November 25, 2018, 10:49:58 am
If QB64 is not in that right click menu, see : https://support.microsoft.com/en-us/help/18539/windows-7-change-default-programs

Pete