Hello,
First :
i try to make a script to list directories and subdirectories on my server.
The script below works but is it possible to do it in a better way?
As you see, it's a bit complicate.
second:
is it possible to do the same to retrieve the list of files name and files size ?
Thanks
First :
i try to make a script to list directories and subdirectories on my server.
The script below works but is it possible to do it in a better way?
FTP Script
- $host="myftp"
- $user="myusername"
- $password="mypassword"
- :start
- # Connect to FTP server
- # check what happened with openhost
- GOTO :start
- $listfinal=""
- # For each directory in $list print the name
- $newdir0="/".$item0
- $listfinal=$newdir0
- $listfinal=$listfinal."|".$newdir0
- $newdir1=$newdir0."/".$item1
- $listfinal=$listfinal."|".$newdir1
- $newdir2=$newdir1."/".$item2
- $listfinal=$listfinal."|".$newdir2
- $newdir3=$newdir2."/".$item3
- $listfinal=$listfinal."|".$newdir3
- $newdir4=$newdir3."/".$item4
- $listfinal=$listfinal."|".$newdir4
- $newdir5=$newdir4."/".$item5
- $listfinal=$listfinal."|".$newdir5
- $newdir6=$newdir5."/".$item6
- $listfinal=$listfinal."|".$newdir6
- $nb_elt=0
- $nb_elt = $nb_elt + 1
second:
is it possible to do the same to retrieve the list of files name and files size ?
Thanks
Hi,
ScriptFTP does not support recursion or function calls (mostly for simplicity) but it is something we plan to do in next releases.
So, at this moment it is not possible to do any of those points. As you noticed, the only way at this moment is to have some nested FOREACH loops, one for each level of folders
ScriptFTP does not support recursion or function calls (mostly for simplicity) but it is something we plan to do in next releases.
So, at this moment it is not possible to do any of those points. As you noticed, the only way at this moment is to have some nested FOREACH loops, one for each level of folders
liked Script FTP? Try our other product Email Parser
Hi,
thanks for your answer.
waiting for next release...
thanks for your answer.
waiting for next release...
ScriptFTP does not support recursion or function callsBut it can run a script with parameters
Oh yes, that is a nice trick
liked Script FTP? Try our other product Email Parser
- All times are UTC -