I'm working with a program to get directories and file types. If I could just get around this problem I'd be done. What I need to do is wrap a [variable] string in quotes before writing it to a text file. I am still pretty new to programming and I've been googling for about the past fourty-five minutes.
Here is the section of code that is giving me trouble.
- Do While Not SR3.Peek = -1
-
SW3.WriteLine("compact /c /i " & SR3.ReadLine.Trim)
-
Loop
What it's doing here is reading a file name from a separate text file and writing it to another text file so it can start compact.exe to compress the certain file. The reason I need to figure out how to wrap what's being written in quotes is because spaces in the file path mess things up.
To aid myself in making sense, here is an example of what is
currently being written to the text file:
- compact /c /i C:\ATI\Desktop.ini
Here is what I want:
- compact /c /i "C:\ATI\Desktop.ini"
I've learned some good tricks by reading these forums, but this is my first time posting. I appreciate any help yo uguys could give!