-
error in .vbs FTP routine invoked from VB 6.0
(sorry if this belongs in another thread, I didn't find a VBscript one...)
Hello,
I’m getting an error when trying to run this VBscript.
Script: (the pathname of the script)
Line: 25
Char: 1
Error: type mismatch: ‘format’
Code: 800a000d
Source: Microsoft vbscript runtime error
I’ve used several .vbs FTP scripts before with no problem, but what’s new/different with this one is that the Upload filename is not static, it’s
L(the current date in mmddyy format)t
for example
L020707t
This VBscript is being invoked from some VB 6.0 code.
In VB 6.0 , I’ve used statements like:
DestinationFile = "D:\BD\HT\NewBusiness\HT" & Format(Date, "mmddyy") & ".txt"
all the time without problem.
My question is:
What format do I need to make the .Upload statement in the .vbs to get it to work
Or if that’s not what needs to be done
Is there a way to pass via variables from vb 6.0 to vbscript the names of the two files to use in the upload statement, so I pass in the L020707t name + the path needed?
Thanks in advance,
david
[code]
' VBS Script Generated by CuteFTP (TM) macro recorder.
' Generated, then edited: 02/07/07 by dgr
' Create TEConnection object
Set MySite = CreateObject("CuteFTPPro.TEConnection")
' Initialize remote server host name, protocol, port, etc.
MySite.Host = "ftp.letterlogc.com"
MySite.Protocol = "FTP"
MySite.Port = 21
MySite.Retries = 34
MySite.Delay = 7
MySite.MaxConnections = 4
MySite.TransferType = "ASCII"
MySite.DataChannel = "DEFAULT"
MySite.AutoRename = "OFF"
' WARNING!!! SENSITIVE DATA: user name and password.
MySite.Login = "*******"
MySite.Password = "*******"
MySite.SocksInfo = ""
MySite.ProxyInfo = ""
' Connect to remote server
MySite.Connect
MySite.Upload "D:\DailyLetterRun&RSFUploads\Letters\L" & Format(Date, "mmddyy") & "t", "/L" & Format(Date, "mmddyy") & "t"
MySite.Disconnect
[\code]
Similar Threads
-
By steve in forum Careers
Replies: 8
Last Post: 08-08-2008, 09:46 AM
-
By Larry Rebich in forum .NET
Replies: 2
Last Post: 11-28-2001, 01:14 PM
-
By Jeff Johnson in forum .NET
Replies: 276
Last Post: 10-02-2001, 04:23 PM
-
By Jon Ogden in forum .NET
Replies: 84
Last Post: 01-29-2001, 02:12 PM
-
By Jean-Yves in forum Enterprise
Replies: 3
Last Post: 06-01-2000, 12:23 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|