I am presently selecting pattern = *.txt and it works fine. I need to narrow the scope and select a pattern like this: tovecellio*.txt, it does not seem to find any files even if they are present.
Present code:
Set objRegExp = New RegExp
objRegExp.Pattern = "*.txt"
objRegExp.IgnoreCase = True...
I am archiving files located in folder "e:\fromtravelers" (ie folderName = "e:\ftpdata\fromtravelers\") to folder e:\fromtravelers\archive. Files in folder "fromtravelers" may already exist in "archive" and it so I need to replace them with files from "e:\fromtravelers".
Sorry about the confusion. The latests script posted does not work. If the file already exists in the archive folder it gives an error.
If file exists in the archive folder I need to delete it prior to moving a new file into same folder.
Thank you.
Just making sure I have it correct (I need some error trapping as well):
For Each objFile In fileColl
If objRegExp.Test(objFile.Name) Then
strDest = folderName & "archive\" & newFile
If filesys.fileExists(strDest) Then filesys.DeleteFile strDest
filesys.MoveFile...
Below script moves files to the /Archive folder. In some cases the file may already exists in archive and if so is there a way to replace?
For Each objFile In fileColl
If objRegExp.Test(objFile.Name) Then
On Error Resume Next
filesys.MoveFile objFile, folderName & "archive\" & newFile...
We are getting there, this is an automated script and once I have done the "get" I need to move the file on the remote machine so I do not pick it up again later.
Not sure if we are talking about the same thing (most likely my lack of understanding)
At the line objMyFile.WriteLine ("get " & strFilePut) the script picks up a file (whatevere is in the outgoing ftp folder) and does the ftp. I do not now the file name of the ftp file as it has a date/time...
I have a FTP script and after the FTP I need to move the file to a backup folder. Not sure how to do this:
Option Explicit
Dim strFTPScriptFileName, colFiles, objFile, objFSO, objMyFile, objShell, objFolder, strFilePut
Dim strLocalFolderName, strFTPServerName, strLoginID
Dim strPassword...
I tried this:
Dim myDataSet As New Data.DataSet
myDataSet = CType(Request.Form("mySqlDataSet"), Data.DataSet)
Still got the same error.
What is the approach to using a session variable?
Thank you.
I have a web page that displays a gridview (page 1). On this page I have a button saying "View Report" (link to page 2) and the intent is to render a new page showing a crystal report with same content as in the girdview on page 1.
Not sure how to navigate from page 1 to page 2, here is what I...
I have a script where I loop through a folder and deletes certain files. The 1st loop works fine and file is deleted. On subsequent loops I get error "permisson denied 800A0046". I am running the script under administrator. Can someone help me here? Thank you.
If...
Is there a way of having a vb script pause after getting each file (using wscript.sleep ?). I need to do some processing on the recipient side before next file can be retrieved?
Set objFSO = CreateObject("Scripting.FileSystemObject")
If (objFSO.FileExists(strFTPScriptFileName)) Then...
I have never used error handling before and wonder where to put the 'error monitoring'. Here is a script that I use:
'VB Script - Archive Outbound FTP Files (pgp format)
Dim filesys, file, folderName, objFile, folderObj, fileColl, objRegExp, newFile
Set filesys =...
That really helped and I'm able to run all my scripts inside the "main script". Last question, how would I tell the "main" script where to locate my scripts? They are in folder "e:\ftpscript. Thank you very much.
So, would this be a correct assumption running 3 jobs?
'VBScript Run Reliance FTP, consists of 3 scripts in sequence
'syntax: object.Run (Command [, WindowStyle] [, WaitOnReturn])
Option Explicit
Set objShell = CreateObject("WScript.Shell")
objShell.Run "FirstJob.vbs,0,True)
objShell.Run...
Got the code finally working. The changes I did were:
1. from
"objMyFile.WriteLine "user " & strLoginID & " " & strPassword"
to
objMyFile.WriteLine (strLoginID)
objMyFile.WriteLine (strPassword)
it had to be in 2 separate lines, did not accept one line
2. also changed
strLocalFolderName =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.