Re: Trigger CuteFTP macro from .vbs

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 17:10:05 +0200

jason@catamaranco.com wrote:

> Could someone help me create a simple .vbs script to execute
> this command line CUTEFTP macro:
>
> "C:\Program Files\GlobalSCAPE\CuteFTP\CutFTP32.exe"
> Macro=c:\Pricing_Lagoon.mcr
>
> I tried slamming this in a .vbs extension file but got an error...
> must be more to it!
Hi

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")

' Inside a quoted string, use two quotes to get one effective.
sCmd = """C:\Program Files\GlobalSCAPE\CuteFTP\CutFTP32.exe""" _
      & " Macro=c:\Pricing_Lagoon.mcr"

' Launch the command and wait for it to finish
oShell.Run sCmd, 1, True
'--------------------8<----------------------

WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: Double Quotes Problem with Command Line
    ... > I want to send a command to the command line. ... The double quotes are required in the command string. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Double Quotes Problem with Command Line
    ... >> I want to send a command to the command line. ... It's probably a double quotes problem. ... > Inside a quoted string, you will need to use two quotes to get ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)
  • Re: How to store XSL as a variable
    ... Rob C wrote: ... Inside a quoted string, use two quotes to get one effective: ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: writing apostrophes to a text file
    ... Inside a quoted string, use two quotes to get one effective: ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Booming or Fuming? Are You Alive? Or Are You Fading Away?!
    ... The single .cmd file which is a Command Library ... consists of ONLY scripting code using ONLY ... every detail of convoluted shell scripting command syntax. ...
    (microsoft.public.win2000.cmdprompt.admin)