Author Topic: QuickBasic / PDS / QB64 - Set Working Directory?  (Read 2911 times)

0 Members and 1 Guest are viewing this topic.

Offline davidshq

  • Newbie
  • Posts: 55
    • View Profile
QuickBasic / PDS / QB64 - Set Working Directory?
« on: September 19, 2020, 01:05:30 pm »
In PDS I can go to Options --> Set Path and tell PDS where my code files are located. So, for example, I have a structure that looks like this in DOSBox:

C:\bin - Where all the PDS executables are, including QBX.EXE
C:\CWSTRAT - Where all my code files reside

Unfortunately, while setting the path does fix the issue for code files it does nothing for my non-code file includes, e.g. data files and images. PDS continues looking in C:\bin instead of in C:\CWSTRAT for the necessary files.

In QB64 there doesn't appear to be a Set Path option at all.

I'm trying to use PDS to do some step-by-step debugging, wondering if anyone knows if there is a way to set a working directory (or something similar) in PDS so I don't have to mix all my files in with the bin files?

Also out of curiosity, would like to know if there is a way to accomplish the same with QB64?

Thanks,
Dave

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QuickBasic / PDS / QB64 - Set Working Directory?
« Reply #1 on: September 19, 2020, 01:16:22 pm »
I think you have a choice to fully path your files for QB64 to find them or CHDIR "MyPath" from which you can path your files relative to that directory or put all files in same folder as where EXE is going and/or path your files from there. Sometimes you might need a "./" where you might think you don't to say my file or folder should be right where we are!

_CWD$, Current Working Directory, will give update of where you are and might help too.
« Last Edit: September 19, 2020, 01:22:23 pm by bplus »

Offline davidshq

  • Newbie
  • Posts: 55
    • View Profile
Re: QuickBasic / PDS / QB64 - Set Working Directory?
« Reply #2 on: September 19, 2020, 01:55:36 pm »
Thanks bplus!

I've learned in PDS one can navigate into the directory one wants to use as the working directory and then execute c:\path\to\pds\bin\qbx.exe and it will then use the direct you launched qbx from as the working directory.