Dim fso
Set fso = CreateObject("Scripting.Filesystemobject")
For Each file In fso.GetFolder("c:\temp\myfolder").Files
newpath = file.Path
newpath = Left(newpath,Len(newpath)-4) 'remove last 4 characters
newpath = Left(newpath,Len(newpath)-3) & "." & Right(newpath,3) 'insert a dot...
Dim fso
Set fso = CreateObject("Scripting.Filesystemobject")
mydate = Now - 7
Set output = fso.CreateTextFile("c:\temp\output.txt",True)
Browse fso.GetFolder("\\myserver\myshare")
output.Close
Sub Browse(folder)
For Each file In folder.Files
If file.DateLastModified>mydate Then...
You can use VBScript to dynamically write a ftp script:
Dim fso
Set fso = WScript.CreateObject("Scripting.Filesystemobject")
Set ftp = fso.CreateTextFile("c:\temp\ftpscript.txt",True)
ftp.WriteLine "open ftp.myftpserver.com 21"
ftp.WriteLine "myusername"
ftp.WriteLine "mypassword"...
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.