Re: directory listing, mp3 files
- From: "Rick Rothstein \(MVP - VB\)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 15:17:43 -0400
CD "C:\Program Files\PostgreSQL\8.1\bin"
dropdb misc
createdb misc
psql misc < "C:\dump.sql"
Using your code, would it be possible to do this inside VB? Currently
I have to shell a new comand prompt then pass the code one line at a
time via sendkeys. It would be much easier if I could send the code
all at once and also be able to know what the command prompt responds
with.
Since Shell can only process one command line, it would appear no. However,
I can think of two possible ways to approach the problem (never tried either
of these myself). One approach would be to set up a DOS batch file as a
template (using DOS variables for the directory and filename), you could
probably execute the batch file from the Shell command and, as part of the
argument to the Shell command, pass in the appropriate text strings for the
batch file to use. Another possible approach would be to create a batch file
on the fly... open the file, Print# the above lines into it, close the file,
force flush the file to the hard drive (I'm pretty sure there is an API for
that), wait for the operation to complete and then run a Shell statement to
execute the newly created batch file (deleting it when done).
Rick
.
- References:
- directory listing, mp3 files
- From: Dan
- Re: directory listing, mp3 files
- From: Timo
- Re: directory listing, mp3 files
- From: David L. Jones
- Re: directory listing, mp3 files
- From: Frank Adam
- Re: directory listing, mp3 files
- From: David L. Jones
- Re: directory listing, mp3 files
- From: Frank Adam
- Re: directory listing, mp3 files
- From: David L. Jones
- Re: directory listing, mp3 files
- From: Dan
- Re: directory listing, mp3 files
- From: Rick Rothstein \(MVP - VB\)
- Re: directory listing, mp3 files
- From: Dan
- directory listing, mp3 files
- Prev by Date: Re: Can't Register freeimage DLL
- Next by Date: Re: Can't Register freeimage DLL
- Previous by thread: Re: directory listing, mp3 files
- Next by thread: Re: directory listing, mp3 files
- Index(es):
Relevant Pages
|