Feb 3, 2010
I am working on a VB Console Application that takes an Autocad drawing type DWG and converts it to a PDF using a shell command that calls a third party application. In this case, acmecadconverter.exe from www.dwgtool.com. Then the PDF that is created needs a unique watermark, so I call a second application for that called pdftk.exe from www.accesspdf.com/pdftk/.
View 2 Replies
Everything works as intended, except when I try file names that contain spaces. The file system object does not tolerate spaces in the drawing file name. For instance, the following command gives me a system.io.filenotfoundexception...
My.Computer.FileSystem.RenameFile("Test Flowchart1.dwg", "Test~Flowchart1.dwg")
It's the same problem for all of my File System commands. Either file not found or invalid arguments.
The complete script I'm using is here:
Dim arrArgs() As String = Command.Split(","), _
i As Integer, folderPath As String, myPart As String, _