Jump to content
Sign in to follow this  
retaly

possible to check dirs on ftp?

Recommended Posts

retaly

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 :/

Share this post


Link to post
Share on other sites
water

AutoIt comes with a FTP UDF. Check the help file for the functions named _FTP_*


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
mrflibblehat

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 by mrflibblehat

[font="'courier new', courier, monospace;"]Pastebin UDF | Prowl UDF[/font]

Share this post


Link to post
Share on other sites
retaly

tyvm

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  

×