lang • shell2

Shell$

QuotedString = Shell ( String ) QuotedString = Shell$ ( String )

Quotes a string so that it can be safely sent to the SHELL command.

Examples

'This routine will create a file in your home folder with the name "what a stupid name 4 a file % $ !.txt"
'The string created by Shell$ will be printed and the file opened.

Public Sub Form_Open()
  Dim sString As String

  sString = Shell$("what a stupid name 4 a file % $ !.txt")
  Print sString
  Shell "echo " & sString & " >> " & user.home &/ sString 
  Shell "xdg-open " & User.home &/ sString

End

See also