Sign in to follow this  
Followers 0
falcontechnics

Changing file attributes (modified date) via FTP

1 post in this topic

Hello,

 

When a script started as shown below, the “modified time/dates” of the files inside the directory changes as the time/date of “Starting ftp transfer” Accordingly this sutiation times/dates at host seems like all recived in same moment.

 

Could you please help me to fix this problem ?

 

Thanks in advance.

#include <File.au3>
#include <FTPEx.au3>;

FileFindFirstFile("c:\qmc\senddata\qmc_cmm\*.*" )
      If  not @error = 1 Then
                   Local $putCMM  = _FTP_DirPutContents ($Conn, "c:\qmc\senddata\qmc_cmm", '/DataSmithJr/Result/Assembly/CMM',1)
                   If $putCMM = 0 Then
                        exit
                  EndIf
                EndIf

 

 

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • JonBMN
      By JonBMN
      Right now I'm trying to connect to a server to upload a file directory, which will be chosen by me once the connection is made. I've checked my FTP settings and it seems that the error is spouting from _FTP_Connect(). Can anyone give me an idea of why my script is not working, or point me in the right direction?
      Include <FTPEx.au3>   FTP() Func FTP()     Local $FTPOpen, $FTPConnect, $FTPServer     Local $User, $Pass, $InstallFolder     Local $FTPlocation, $FTPUpload, $FTPName     Local $flag, $INIlocation = "UpdateConfig.ini"     $flag = 0     $FTPName = IniRead($INIlocation, "1", "FTP Site", "")     $FTPServer = IniRead($INIlocation, "1", "Server Name", "")     $User = IniRead($INIlocation, "1", "Username", "")     $Pass = IniRead($INIlocation, "1", "Password", "")     $FTPlocation = IniRead($INIlocation, "1", "FTP Location", "")     ConsoleWrite("Name: " & $FTPName & " Server: " & $FTPServer & " User: " & $User & " Pass: " & $Pass & " Remote location: " & $FTPlocation)     $FTPOpen = _FTP_Open($FTPName)     $FTPConnect = _FTP_Connect($FTPOpen, $FTPServer, $User, $Pass, 1)     If $FTPConnect <> 0 Then         MsgBox(0, "Alert", "You must specify the path to the folder to upload", 20)         $InstallFolder = FileSelectFolder("Open", @WorkingDir)         If @error Then             $flag = 1         EndIf         If $flag = 1 Then             MsgBox(0, "FTP", "No folder chosen.. Exiting.", 20)             _FTP_Close($FTPOpen)             Return         EndIf         $FTPUpload = _FTP_DirPutContents($FTPConnect, $InstallFolder, $FTPlocation, 1)         If $FTPUpload <> 0 Then             MsgBox(0, "FTP", "File(s) successfully uploaded!", 20)         Else             MsgBox(0, "FTP", "File(s) were not successfully uploaded! Check your FTP location and try again.", 10)         EndIf     Else         MsgBox(0, "FTP", "Please check the FTP settings and try again. Error Code: " & $FTPConnect & " @error:" & @error, 100)     EndIf     _FTP_Close($FTPOpen) EndFunc   ;==>FTP