Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted
Drives me insane. You usually dou double quotes sometimes triple or single quotes in double quotes. Show me what you want to do it with exactly and I can tell you.
Posted

Good good. Check out this fun I had building the command line for a recent image coversion wrapper:

 

StrCMDLine = "c:\imagemagick\convert.exe " & """" & CombinedPath & """" & " " & """" & OutPath & """"

Posted

If you are starting to lose track of things, then you can always use chr(34)

MyCmdLine = "App.exe " & chr(34) & "C:\Path with spaces\file.dat" & chr(34)

 

Sometimes it's easier that way.

 

The other thing I do is to create an Enqote function

function Enquote(sSource)
 Enquote = chr(34) & sSource & chr(34)
end function

 

Then you can do

MyCmdLine = "App.exe " & Enquote("C:\Path with spaces\file.dat")

Posted
If you are starting to lose track of things, then you can always use chr(34)
MyCmdLine = "App.exe " & chr(34) & "C:\Path with spaces\file.dat" & chr(34)

 

Sometimes it's easier that way.

 

The other thing I do is to create an Enqote function

function Enquote(sSource)
 Enquote = chr(34) & sSource & chr(34)
end function

 

Then you can do

MyCmdLine = "App.exe " & Enquote("C:\Path with spaces\file.dat")

 

That's a nice approach. Thanks :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...