Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Build a comand string

Status
Not open for further replies.

vgwprja

Programmer
Mar 27, 2008
24
US
I have problems with building a string using '"'. Below is the string:

command = "pgp --encrypt " & fromFile & " --recipient " & """travelers""" & " --output " & toFile

I need to have the variables fromFile and toFile within quotes ('). Thank you.
 
Solved, here is correct string:

command = "pgp --encrypt """ &fromFile& """ --recipient " & """travelers"""
 
within quotes (')
Code:
command = "pgp --encrypt '" & fromFile & "' --recipient 'travelers' --output '" & toFile & "'"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top