Script running a batch file from a button

SOLVED

Hi Forum,

I have a VB Script in a button.  The only thing it does is run a batch file to move files.

the script runs manually but it doesn't do anything when i click on the button.

I've tried the client & server options with no luck.

The following is the command that i have in the VB Script.

CreateObject("Wscript.Shell").Run """\\shp-fin-sage\ACCTG\Yooz_Project\Apps\Manual_process.bat""", 0, True

Any suggestions ?

Regards,

Manuel Roman

Parents
  • +1
    verified answer

    This is from a script I have... not sure if it will work with a button.

    sFTPDirCommand = "%comspec% /c TriggerFTPDirectory.bat"

    Set oShell = CreateObject("Wscript.shell")

    oShell.Run sFTPDirCommand, 0, true

    ...but if you are just moving files, why use a batch file for that?

    Set objFSO = CreateObject("Scripting.FileSystemObject")

    objFSO.MoveFile inFile, inFile & ".DONE"

Reply
  • +1
    verified answer

    This is from a script I have... not sure if it will work with a button.

    sFTPDirCommand = "%comspec% /c TriggerFTPDirectory.bat"

    Set oShell = CreateObject("Wscript.shell")

    oShell.Run sFTPDirCommand, 0, true

    ...but if you are just moving files, why use a batch file for that?

    Set objFSO = CreateObject("Scripting.FileSystemObject")

    objFSO.MoveFile inFile, inFile & ".DONE"

Children