del not working in .bat file



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.

RBS

.



Relevant Pages

  • Re: del not working in .bat file
    ... 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. ... Set oShell = CreateObject ...
    (microsoft.public.vb.general.discussion)
  • Re: del not working in .bat file
    ... <ReadCodeForSQLite.sql del ReadCodeForSQLite.sql ... Set oShell = CreateObject ... is it possible that the working directory is currently on a drive other than ... If it is VBScript then this is doubly the wrong group. ...
    (microsoft.public.vb.general.discussion)
  • RE: slow cable modem downloads
    ... del %temp%\*.tmp /f ... Reboot at this point and delete the .bat file on your Desktop. ... copy the text below to Notepad and save it to your ... virus/malware free is not good. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Minimize all windows
    ... The docs state "Minimizes all of the windows ... > reference to "Microsoft Shell Controls And Automation". ... > Dim oShell As Shell32.Shell ... > Set oShell = New Shell ...
    (microsoft.public.vb.general.discussion)
  • Re: Simplest code to access default gateway settings
    ... command to set the default gateway. ... This code should echo back the default gateway IP. ... Dim oShell ... Set oShell = CreateObject ...
    (microsoft.public.scripting.vbscript)