"current directory", Microhelp

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Guest
"current directory", Microhelp

Post by Guest » Fri Jan 30, 2004 5:46 pm

I am writing a Quickbasic program which I expect to work okay, but I can't perfect it until I have the capability to determine what the current directory is.

I looked in my "The Waite Group's Microsoft QuickBasic Bible (1990)" and it says that this ability does not exist in QuickBasic, although it can be added to QuickBasic with a third-party routine, MhDir, which is part of Mach 2, from MicroHelp, Inc. I did a little detective work and it appears MicroHelp is no more. (Don't call their phone number; a guy named Russ answers. <g>) I wonder if anyone knows where to find this Mach 2 software.

Maybe I'll just have to learn another programming language someday.

Greg

Guest

Re: "current directory", Microhelp

Post by Guest » Sat Jan 31, 2004 12:07 am

Try this


SHELL "cd >> dir.txt"
OPEN "dir.txt" FOR INPUT AS #1
INPUT #1, a$
PRINT a$
CLOSE #1
KILL "dir.txt"

Pappy1942

Artie
Jr. Member
Posts:23
Joined:Fri Feb 06, 2004 12:48 am
Location:Florida
Contact:

Re: "current directory", Microhelp

Post by Artie » Fri Feb 06, 2004 5:20 pm

Not a big deal, but in the above code, only one ">" is needed.

SHELL "cd > dir.txt"

This will create a new dir.txt file, while using two ">" will append the info to an existing dir.txt file, (if it exists).

Artie

Post Reply