retaly Posted December 8, 2014 Share Posted December 8, 2014 (edited) Hi, i've got a small problem what i cant fix, please help me in it! :S my problem is that my script working well if i try to check directories in root on ftp server, for example: 0:/exampledir i explaining my problem in this script below, i cant find "exampledir" in "main dir" in root, 0:/main/, i dont know how to check dir exist inside other one, please help me! Local $vServer = 'xxx' Local $vUsername = 'xxx' Local $vPass = 'xxx' Local $vFTPFolder = 'exampledir' Local $vOpen = _FTP_Open('MyFTP') Local $vConn = _FTP_Connect($vOpen, $vServer, $vUsername, $vPass) Local $vDirList = _FTP_ListToArray($vConn, 1) $vSearchArray = _ArraySearch($vDirList, $vFTPFolder) ; <---this part check the directory is exist or not exist in root folder: www.mysite.com/exampledir/ ;$vSearchArray = _ArraySearch($vDirList,"main/" & $vFTPFolder) <--- i would something like this: www.mysite.com/main/exampledir/ 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 December 8, 2014 by retaly Link to comment Share on other sites More sharing options...
iamtheky Posted December 8, 2014 Share Posted December 8, 2014 _FTP_DirSetCurrent to "main dir", then _FTP_ListToArray ? ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
retaly Posted December 8, 2014 Author Share Posted December 8, 2014 im new in thats ftp, and in autiot aswel, i started some scripts 1 yeahrs ago then stoped it cuz i had not free time for it, now wanna to learn this more! please help me with a short example Link to comment Share on other sites More sharing options...
retaly Posted December 9, 2014 Author Share Posted December 9, 2014 please some1 help Link to comment Share on other sites More sharing options...
iamtheky Posted December 9, 2014 Share Posted December 9, 2014 do you really not understand how to put _FTP_DirSetCurrent directly above your _FTP_ListToArray? Because if writing a single line of code is your issue, you need to start a new thread. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
retaly Posted December 9, 2014 Author Share Posted December 9, 2014 unfortunately i rly dont know.. :/ u may could send me in pm? then dont need to start a new thread Link to comment Share on other sites More sharing options...
retaly Posted December 11, 2014 Author Share Posted December 11, 2014 i dont know how to do, know u wrote but i dont know.. have to give up this script too :/ np Link to comment Share on other sites More sharing options...
iamtheky Posted December 11, 2014 Share Posted December 11, 2014 I dont know if you think tedium will lead to code, but it doesnt. Code leads to code. You HAVE to try, how did you get 121 posts in never having typed a single line of code. .... Local $vConn = _FTP_Connect($vOpen, $vServer, $vUsername, $vPass) _FTP_DirSetCurrent(**SOMETHING GOES HERE***) ;take a wild guess Local $vDirList = _FTP_ListToArray($vConn, 1).... ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
retaly Posted December 11, 2014 Author Share Posted December 11, 2014 do not work.. Link to comment Share on other sites More sharing options...
iamtheky Posted December 12, 2014 Share Posted December 12, 2014 Wheres your script, error code, screenshot, youtube video, or facebook link to the picture of the error you took and uploaded from your smart phone? 3 words and 2/3 of an ellipsis makes me glad it didnt work. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
retaly Posted December 12, 2014 Author Share Posted December 12, 2014 there is not error, only when try it on this way: if i write $Conn in _FTP_DirSetCurrent then it does nothing, the script is stop at this command, not crash, not error, only not continue to read lines Local $vConn = _FTP_Connect($vOpen, $vServer, $vUsername, $vPass) _FTP_DirSetCurrent($Conn, "/testdir/") Local $vDirList = _FTP_ListToArray($vConn, 1) Link to comment Share on other sites More sharing options...
retaly Posted December 16, 2014 Author Share Posted December 16, 2014 so? Link to comment Share on other sites More sharing options...
iamtheky Posted December 16, 2014 Share Posted December 16, 2014 (edited) so.... there a couple of a scripts floating around like this: '?do=embed' frameborder='0' data-embedContent>> that utilize dirsetcurrent, none have the trailing slash (and appears none have the leading slash). and if your connection is $vConn your script is failing when you use $Conn in DirSetCurrent. And that error is probably in red letters at the bottom of your Scite window when you attempt to run this script. Edited December 17, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
retaly Posted December 22, 2014 Author Share Posted December 22, 2014 i dond know.. dont understand this by links. Link to comment Share on other sites More sharing options...
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