tranchemontaigne
Registered User.
- Local time
- Today, 04:56
- Joined
- Aug 12, 2008
- Messages
- 203
When I use the Write # method to srite string data into a text output file, the output is nested between double quotes.
My problem is that I want to dynamically create a batch file that deletes temporary files MS Access has created (through custom VBA code) upon exit.
When I use this approach the batch file always fails because the DOS command is nested between double quotes.
Any thoughts or suggestions on how to solve this problem would be appreciated
________
Uhwh Warehouse
My problem is that I want to dynamically create a batch file that deletes temporary files MS Access has created (through custom VBA code) upon exit.
When I use this approach the batch file always fails because the DOS command is nested between double quotes.
strFileAndPath = CurrentProject.Path & "\ClearTempFiles.bat"
Open strFileAndPath For Output Access
Write As #1 strBatchInstruction = "DEL " & Chr(34) & CurrentProject.Path & "\~*.*" & Chr(34)
Write #1, strBatchInstruction
Close #1
Call Shell(strBatchInstruction)
SetAttr strFileAndPath, vbHidden
DoCmd.Quit
Any thoughts or suggestions on how to solve this problem would be appreciated
________
Uhwh Warehouse
Last edited: