Matthew Page

MrPLC Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Matthew Page

  • Rank
    Hi, I am New!

Profile Information

  • Country United Kingdom
  1. Please can someone assist me with a project we are working on. We use NA HMIs to log data to a USB drives. Our client requires access to these files via FTP. The HMI has an FTP area that can be accessed however there is no direct way of copying these folders between locations. I can run some VB script in the background and trigger the sub routine from the PLC. Not knowing anything about VB scripts I'm struggling to get this to work. This code only works if the date is included IO.DirectoryInfo("\UsbDisk\Data Logging\Log Files\DataSet0\yyyymmdd") a new folder is created every night at midnight with a new date. so having a fixed date will only work for that day. Ideally I want the to copy everything from (UsbDisk\Data Logging\Log Files) ignoring the (DataSet0\yyyymmdd") 'Code behind Page - Add local subroutines for the page. Sub Test Dim di As New IO.DirectoryInfo("\UsbDisk\Data Logging\Log Files\DataSet0\20191127 ") Dim Diar1 As IO.FileInfo() = di.GetFiles() Dim dra As IO.FileInfo   For Each dra In Diar1 System.IO.File.Copy(dra.FullName, "\User\SysmacHMI\FTP\" + dra.Name,True)   Next End Sub