retaly Posted October 5, 2013 Posted October 5, 2013 hi, i tryed to do it myself but i cant imagine how to do it, i wanna to check dirs on my ftp, for example: if dir named to "test" on ftp, then i could to check its exist or not on ftp, if its already exist then get msgbox and do nothing, if not exist then makedir on ftp, please help :/
water Posted October 5, 2013 Posted October 5, 2013 AutoIt comes with a FTP UDF. Check the help file for the functions named _FTP_* My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
mrflibblehat Posted October 5, 2013 Posted October 5, 2013 (edited) Something like this #include <FTPEx.au3> #include <Array.au3> Local $vServer = '127.0.0.1' Local $vUsername = 'user' Local $vPass = 'pass' Local $vFTPFolder = 'test' Local $vOpen = _FTP_Open('MyFTP Control') Local $vConn = _FTP_Connect($vOpen, $vServer, $vUsername, $vPass) Local $vDirList = _FTP_ListToArray($vConn, 1) $vSearchArray = _ArraySearch($vDirList, $vFTPFolder) If @error Then $vDirCreate = _FTP_DirCreate($vConn, $vFTPFolder) msgbox(0, "FTP", "Directory " & $vFTPFolder & " Created On The Server") Else msgbox(0, "FTP", "Directory Already Exists On The Server") EndIf Edited October 5, 2013 by mrflibblehat [font="'courier new', courier, monospace;"]Pastebin UDF | Prowl UDF[/font]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now