Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help
#9
Moneo:

I feel that you do not read all posts.  If you will take the time to read my post, which I have qoted here below, you will see that I showed and explained the use of the /p switch for the dir command.  And, to search for a particular file, say qb.exe, one can easily use
SHELL "dir qb.exe"  or, even 
SHELL "dir c:\qb\qb.exe"
And if the file does not exist, you will get a "File not found" message.  Oh, yes, no need to make this into a program!  I just use,
CLS:SHELL "dir qb.exe"  on the immediate line and press Enter.  Presto, I get my answer, and can easily go back to my normal coding area.

(07-05-2008, 01:59 AM)Ralph link Wrote:To only "see" the files, you can use the SHELL statement Roy mentioned.  For instance, to see the directory of my QB files, which are in the same directory as my QB.exe files, I can use
SHELL "DIR/P"

The SHELL statement let's me use DOS commands, such as DIR, including its switches, such as /P, which let's one scroll the directory, one page at a time.
Notice that the syntax is
SHELL string
so the string part has to be either an actual string, such as "DIR/P", or a string variable, such as direct$ = "DIR/P"; in the case of a string variable, use
SHELL direct$

To see the directory of  My Documents, use
SHELL "c:\MyDocu~1/p"
in accordance with the DOS method of seeing filenames with more than 8 characters.

Look in the Help, Syntax, SHELL statement for more information on this.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Messages In This Thread
help - by LPG - 07-04-2008, 01:12 PM
Re: help - by Opresion - 07-04-2008, 03:47 PM
Re: help - by roy - 07-04-2008, 08:45 PM
Re: help - by wildcard - 07-04-2008, 10:44 PM
Re: help - by Ralph - 07-05-2008, 01:59 AM
Re: help - by Dav - 07-07-2008, 09:03 PM
Re: help - by Moneo - 07-09-2008, 12:11 AM
Re: help - by Moneo - 07-09-2008, 05:09 AM
Re: help - by Ralph - 08-07-2008, 08:21 PM
Re: help - by Clippy - 08-08-2008, 09:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)