im creatin and ftp program in dbc based on dos commands ,
here is the code :
rem PROGRAM : DarkFTP
rem VERSION : v0.1
rem CREATED BY : Shlomi Nahari
` system
hide mouse
` background and text color
ink rgb(100,255,100),rgb(32,64,32) : cls
` label
text 593,0,"DarkFTP v0.1"
` ftp details
print " "
input " ADRESS > " ;a$
input " USERNAME > " ;u$
input " PASSWORD > " ;p$
` connect
url$= a$ : user$= u$ : password$= p$
print " CONNECTING TO : "; url$
ftp connect url$, user$, password$
if get ftp failure()=1
print " connection failed "
end
endif
` commands
print " "
do
input " FTP >> " ; z$
rem command exit
if z$ = "exit" then end
rem command dir
if z$ = "dir"
print " "
ftp find first
while get ftp file type() >= 0
print get ftp file name$()
ftp find next
endwhile
print " "
endif
rem command commands
if z$ = "commands"
print " "
print " ALL COMMANDS MUST BE IN SMALL LETTERS "
print " COMMANDS LIST : "
print " "
print " dir - LIST OF FILES/FOLDERS "
print " commands - LIST OF ALL COMMANDS "
print " exit - CLOSE PROGRAM "
print " cd [folder] - GET IN TO SELECTED FOLDER "
print " cd.. - GET OUT TO THE LAST FOLDER "
print " download [filename] - DOWNLOAD FILE FROM FTP TO PC "
print " upload [filename] - UPLOAD FILE FROM PC TO FTP "
print " "
endif
rem command cd
if left$(z$,3) = "cd "
folder$ = right$(z$,len(z$)-3)
ftp set dir folder$
print " "
print "Enter Directory/";folder$
print " "
endif
rem command cd..
`end main loop
loop
like u can see i need help with the command "cd.." , i can get into a folder but i dont know how to go back !