Datalore Posted May 9, 2004 Share 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? Link to comment Share on other sites More sharing options...
maxXPsoft Posted May 12, 2004 Share 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 Link to comment Share on other sites More sharing options...
Datalore Posted May 12, 2004 Author Share Posted May 12, 2004 Never mind, issue solved.Solution here Link to comment Share on other sites More sharing options...
maxXPsoft Posted May 13, 2004 Share 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 Link to comment Share on other sites More sharing options...
Datalore Posted May 13, 2004 Author Share Posted May 13, 2004 AddBackslash(App.path) is a lifesaver. Link to comment Share on other sites More sharing options...
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