Datalore Posted May 9, 2004 Posted May 9, 2004 I am angry. I have a program that copies a batch file to a location, and the batch file deletes a file. Here's the psuedo code:----------Program.exe Copy Batch to LocationRun Location\Batch ---------Batch.bat Delete FileOk, so the batch should delete the file in whatever directory I copy it to. But it doesn't. It tries to delete the file in the application directory (where Program.exe is).I'm using VB6. Any ideas?
maxXPsoft Posted May 12, 2004 Posted May 12, 2004 Maybe I don't quite understandIf in VB use the KillKill App.Path & "\sp1.cmd"In batch file use simply deldel c:\test
maxXPsoft Posted May 13, 2004 Posted May 13, 2004 K i see now and thats good to remember. I had trouble with that once before and my solution was in my batch i just used a CD in first line to dir it's already in and it work's without having to change my prog's path since I use a lot of call's to AddBackslash(App.Path) & "I guess you can see that would create a problem if I forgot to add the ChDir back in the prog
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now