Re: del not working in .bat file
- From: "RB Smissaert" <bartsmissaert@xxxxxxxxxxxxxxxx>
- Date: Mon, 20 Nov 2006 20:20:43 -0000
The file is not Read-Only, the file will be on the normal local C drive and the file can be deleted manually.
Maybe though the file is still in use by SQLite when the del command is called.
I don't know how the sequence of commands is in a .bat file.
Could it be that a command is called while the previous line is not finished yet?
Is there something like a wait or DoEvents in a .bat file?
I thought the way with WScript was an easy way to run the .bat file without showing the console.
Yes, maybe I should do away with the .bat file, but it works fine except on this one machine.
No, I am not running VBS, except for this one call.
RBS
"Bob Butler" <tiredofit@xxxxxxxxxxx> wrote in message news:uMqqf9NDHHA.2328@xxxxxxxxxxxxxxxxxxxxxxx
"RB Smissaert" <bartsmissaert@xxxxxxxxxxxxxxxx> wrote in message
news:O6W8GtNDHHA.348@xxxxxxxxxxxxxxxxxxxx
Have the following .bat file:
cd C:\RBSSynergyReporting\ReadCodes
del ReadCode.db
C:\RBSSynergyReporting\Program\SQLite3 ReadCode.db
<ReadCodeForSQLite.sql del ReadCodeForSQLite.sql
and this is called like this:
Dim oShell
Set oShell = CreateObject("WSCript.shell")
oShell.Run "cmd /C " & strBATFile, 0
Set oShell = Nothing
DoEvents
All this works fine, except on one machine the line: del
ReadCodeForSQLite.sql
doesn't delete the .sql file. I can't see that machine, so not sure
what is going on.
Any ideas what the trouble could be here?
The file is present and there are no permission problems. VBS is
present as well.
apart from this not being a VB question...
is the file read only?
is it possible that the working directory is currently on a drive other than
C:?
can you delete it manually?
why don't you eliminate the BAT file and control the steps directly from VB?
BTW, if this really is called from VB and not VBScript then you should lose
the WScript.Shell object and use VB's Shell function or one of the API calls
for starting an app. If it is VBScript then this is doubly the wrong group.
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
.
- Follow-Ups:
- Re: del not working in .bat file
- From: Bob Butler
- Re: del not working in .bat file
- References:
- del not working in .bat file
- From: RB Smissaert
- Re: del not working in .bat file
- From: Bob Butler
- del not working in .bat file
- Prev by Date: "not responding" and refresh label question
- Next by Date: Re: "not responding" and refresh label question
- Previous by thread: Re: del not working in .bat file
- Next by thread: Re: del not working in .bat file
- Index(es):
Relevant Pages
|