FTP Client - Mr Liam - Sep 2, 2014
Hey everyone.
This may be a repost, sorry if it is.. but I don't think I have posted this before.
It's an FTP client I wrote back in 2012, thought maybe it was something worth sharing.
Setup:
- Create a folder.
- Inside that folder create a folder called "Method".
- Put Go.bat inside of the Methods folder.
- Put FTP Client.bat inside of Method's parent directory (the onee you created first)
- Run FTP Client
Files:
FTP Client.bat:
Code ::::PROGRAM_LOAD::::
@echo off
title Mr Liam's FTP
set show=0
set extra=0
mkdir Bookmarks
::::MENU::::
: main
cls
echo.
echo .: Connect options :.
echo.
echo 1) Open from bookmarks.
echo 2) Add to bookmarks.
echo 3) Remove from bookmarks.
echo.
set /p input=Select task:
if %input%==1 goto openconnection
if %input%==2 goto addtobookmarks
if %input%==3 goto removefrombookmarks
echo.
echo ERROR: %input% is not a valid task!
echo Press ENTER!
timeout 5 >nul
goto main
::::CONNACT::::
: openconnection
cls
if %show%==0 goto oc
dir Bookmarks\ /b /d
: oc
echo.
echo .: Bookmarks :.
echo.
set /p file=Bookmark:
if %file%==back goto main
if %file%==list set show=1
if %file%==list goto openconnection
if exist Bookmarks\%file%.bat goto go
echo.
echo File does not exist!
echo Press ENTER!
timeout 5 >nul
goto openconnection
: go
call Bookmarks\%file%.bat
echo Data loaded! Now going to menu with %host%
pause >nul
goto menu
::::Add Bookmark::::
: addtobookmarks
cls
echo.
echo .: Bookmarks - Add Bookmark :.
echo.
echo Fill in the details.
echo.
set /p bmn=Bookmark name:
set /p host=Host or IP:
set /p port=Port:
set /p user=Username:
set /p pass=Password:
cls
echo Now saving data...
pause >nul
cls
if exist Bookmarks\%bmn%.bat del Bookmarks\%bmn%.bat
echo set host=%host%>> Bookmarks\%bmn%.bat
echo set port=%port%>> Bookmarks\%bmn%.bat
echo set user=%user%>> Bookmarks\%bmn%.bat
echo set pass=%pass%>> Bookmarks\%bmn%.bat
cls
echo.
echo .: Bookmarks - Add Bookmark :.
echo.
echo Settings saved!
echo Press ENTER!
timeout 5 >nul
goto main
::::Delete Bookmark::::
: removefrombookmarks
cls
echo.
echo .: Bookmarks - Delete Bookmark :.
echo.
set /p bmn=Bookmark to remove:
if exist Bookmarks\%bmn%.bat goto dele
if not exist Bookmarks\%bmn%.bat goto notexist
: dele
del Bookmarks\%bmn%.bat
echo Deleted the bookmark!
pause >nul
goto main
: notexist
echo Bookmark does not exist!
pause >nul
goto main
: menu
set loc=Methods\%file%
set cmd=null
mkdir Methods\%file%\
cls
echo.
echo .: FTP menu :.
echo.
echo 1) Check connection
echo 2) Check directory
echo 3) Create directory
echo 4) Remove directory
echo 5) Upload file
echo 6) Download file
echo 7) Delete file
echo 8) Rename file
echo.
set /p input=Option:
if %input%==custom goto custom
if %input%==1 goto connect
if %input%==2 goto cd
if %input%==3 goto mkdir
if %input%==4 goto rmdir
if %input%==5 goto put
if %input%==6 goto recv
if %input%==7 goto delete
if %input%==8 goto rename
if %input%==ex set extra=1
if %input%==dx set extra=0
goto menu
: custom
call Bookmarks\%file%.bat
if not exist %loc%\custom.txt (
echo open %host%>> %loc%\custom.txt
echo %user%>> %loc%\custom.txt
echo %pass%>> %loc%\custom.txt
)
set cmd=custom
start Methods\Go.bat
goto end
: connect
call Bookmarks\%file%.bat
if not exist %loc%\connect.txt (
echo open %host%>> %loc%\connect.txt
echo %user%>> %loc%\connect.txt
echo %pass%>> %loc%\connect.txt
echo disconnect>> %loc%\connect.txt
echo ! echo You may now close the window.>> %loc%\connect.txt
echo ! timeout 60 /nobreak>> %loc%\connect.txt
)
set cmd=connect
start Methods\Go.bat
goto end
: cd
cls
set /p arg=Argument: /
call Bookmarks\%file%.bat
if exist %loc%\cd.txt del %loc%\cd.txt
if not exist %loc%\cd.txt (
echo open %host%>> %loc%\cd.txt
echo %user%>> %loc%\cd.txt
echo %pass%>> %loc%\cd.txt
echo ls %arg%>> %loc%\cd.txt
echo disconnect>> %loc%\cd.txt
echo ! echo You may now close the window.>> %loc%\cd.txt
echo ! timeout 60 /nobreak>> %loc%\cd.txt
)
set cmd=cd
start Methods\Go.bat
goto end
: mkdir
cls
set /p arg=Argument: /
call Bookmarks\%file%.bat
if exist %loc%\mkdir.txt del %loc%\mkdir.txt
if not exist %loc%\mkdir.txt (
echo open %host%>> %loc%\mkdir.txt
echo %user%>> %loc%\mkdir.txt
echo %pass%>> %loc%\mkdir.txt
echo mkdir %arg%>> %loc%\mkdir.txt
echo disconnect>> %loc%\mkdir.txt
echo ! echo You may now close the window.>> %loc%\mkdir.txt
echo ! timeout 60 /nobreak>> %loc%\mkdir.txt
)
set cmd=mkdir
start Methods\Go.bat
goto end
: rmdir
cls
set /p arg=Argument: /
call Bookmarks\%file%.bat
if exist %loc%\rmdir.txt del %loc%\rmdir.txt
if not exist %loc%\rmdir.txt (
echo open %host%>> %loc%\rmdir.txt
echo %user%>> %loc%\rmdir.txt
echo %pass%>> %loc%\rmdir.txt
echo rmdir %arg%>> %loc%\rmdir.txt
echo disconnect>> %loc%\rmdir.txt
echo ! echo You may now close the window.>> %loc%\rmdir.txt
echo ! timeout 60 /nobreak>> %loc%\rmdir.txt
)
set cmd=rmdir
start Methods\Go.bat
goto end
: put
cls
set /p file1=File:
set /p file2=Directory: /
call Bookmarks\%file%.bat
if exist %loc%\put.txt del %loc%\put.txt
if not exist %loc%\put.txt (
echo open %host%>> %loc%\put.txt
echo %user%>> %loc%\put.txt
echo %pass%>> %loc%\put.txt
echo cd %file2%>> %loc%\put.txt
echo put %file1%>> %loc%\put.txt
echo disconnect>> %loc%\put.txt
echo ! echo You may now close the window.>> %loc%\put.txt
echo ! timeout 60 /nobreak>> %loc%\put.txt
)
set cmd=put
start Methods\Go.bat
goto end
: recv
cls
set /p dir=Directory of file: /
set /p arg=File:
call Bookmarks\%file%.bat
if exist %loc%\recv.txt del %loc%\recv.txt
if not exist %loc%\recv.txt (
echo open %host%>> %loc%\recv.txt
echo %user%>> %loc%\recv.txt
echo %pass%>> %loc%\recv.txt
echo cd %dir%>> %loc%\recv.txt
echo recv %arg% %arg%>> %loc%\recv.txt
echo disconnect>> %loc%\recv.txt
echo ! echo You may now close the window.>> %loc%\recv.txt
echo ! timeout 60 /nobreak>> %loc%\recv.txt
)
set cmd=recv
start Methods\Go.bat
goto end
: delete
cls
set /p dir=Directory of file: /
set /p arg=File:
call Bookmarks\%file%.bat
if exist %loc%\delete.txt del %loc%\delete.txt
if not exist %loc%\delete.txt (
echo open %host%>> %loc%\delete.txt
echo %user%>> %loc%\delete.txt
echo %pass%>> %loc%\delete.txt
echo cd %dir%>> %loc%\delete.txt
echo delete %arg%>> %loc%\delete.txt
echo disconnect>> %loc%\delete.txt
echo ! echo You may now close the window.>> %loc%\delete.txt
echo ! timeout 60 /nobreak>> %loc%\delete.txt
)
set cmd=delete
start Methods\Go.bat
goto end
: rename
cls
set /p dir=Directory of file: /
set /p arg=File:
set /p arg2=New name:
call Bookmarks\%file%.bat
if exist %loc%\rename.txt del %loc%\delrenamete.txt
if not exist %loc%\rename.txt (
echo open %host%>> %loc%\rename.txt
echo %user%>> %loc%\rename.txt
echo %pass%>> %loc%\rename.txt
echo cd %dir%>> %loc%\rename.txt
echo rename %arg% %arg2%>> %loc%\rename.txt
echo disconnect>> %loc%\rename.txt
echo ! echo You may now close the window.>> %loc%\rename.txt
echo ! timeout 60 /nobreak>> %loc%\rename.txt
)
set cmd=rename
start Methods\Go.bat
goto end
: end
goto menu
Go.bat:
Code if %extra%==0 (
ftp -s:%loc%\%cmd%.txt
)
if %extra%==1 (
ftp -v -s:%loc%\%cmd%.txt
)
Hope someone finds this useful, I was 14/15 when I wrote this so it's probably quite shit.
* - Sajuuk - Sep 2, 2014
The fuck is going on? Liam Allen is now 3LAU, right? Who are you? Or are you 3LAU? Who is 3LAU now? Why is one of your past usernames "AMDjack_"? 3LAU used to be Liam Allen and is now Ub3r and has been for some time. For some reason I can't find him in the members list here. What is happening?!
EDIT: 3LAU is Johnny Cache. But... I could've sworn he used to be Liam Allen. My mistake. Or is it? Fucking HTTP header editors. Probably used it to post as someone else.
* - Mr Liam - Sep 2, 2014
(Sep 2, 2014 02:30 PM)Sajuuk Wrote: The fuck is going on? Liam Allen is now 3LAU, right? Who are you? Or are you 3LAU? Who is 3LAU now? Why is one of your past usernames "AMDjack_"? 3LAU used to be Liam Allen and is now Ub3r and has been for some time. For some reason I can't find him in the members list here. What is happening?!
EDIT: 3LAU is Johnny Cache. But... I could've sworn he used to be Liam Allen. My mistake. Or is it? Fucking HTTP header editors. Probably used it to post as someone else.
Who's Liam Allen? I was Liam Allan when for a long time.
* - Sajuuk - Sep 2, 2014
(Sep 2, 2014 02:36 PM)Mr Liam Wrote: Who's Liam Allen? I was Liam Allan when for a long time.
You're Liam Allen. 3LAU used to be Lino126 and is now Johnny Cache. Lino sounds like Liam... kind of. I got you two mixed up.
And yes, this section is still filled with skiddos.
* - Mr Liam - Sep 2, 2014
(Sep 2, 2014 02:39 PM)Sajuuk Wrote: You're Liam Allen. 3LAU used to be Lino126 and is now Johnny Cache. Lino sounds like Liam... kind of. I got you two mixed up.
And yes, this section is still filled with skiddos.
My real name is Liam Allan, not Liam Allen.. one character/letter difference there.
And I gathered, I do still browse here from time to time.
* - Sajuuk - Sep 2, 2014
(Sep 2, 2014 02:45 PM)Mr Liam Wrote: My real name is Liam Allan, not Liam Allen.. one character/letter difference there.
And I gathered, I do still browse here from time to time.
Sorry. Excuse my idiocy. Haven't seen you in a long time. Don't remember what you contributed in the past. I used to be "Obsessed", by the way. And you shouldn't use your real name on a forum like this.
* - Mr Liam - Sep 2, 2014
(Sep 2, 2014 02:52 PM)Sajuuk Wrote: Sorry. Excuse my idiocy. Haven't seen you in a long time. Don't remember what you contributed in the past. I used to be "Obsessed", by the way. And you shouldn't use your real name on a forum like this.
Should of told me that when I signed up back in 2011. 🎉
* - Sajuuk - Sep 2, 2014
(Sep 2, 2014 03:01 PM)Mr Liam Wrote: Should of told me that when I signed up back in 2011. 🎉
I believe only Ub3rs can view username history. Which wasn't a problem three years ago. Now you should be worried because anyone can get Ub3r now. You just have to ask, get 50 or higher from the random number generator, and pay.
* - Mr Liam - Sep 2, 2014
(Sep 2, 2014 03:12 PM)Sajuuk Wrote: I believe only Ub3rs can view username history. Which wasn't a problem three years ago. Now you should be worried because anyone can get Ub3r now. You just have to ask, get 50 or higher from the random number generator, and pay.
Yeah, that's quite a shame that ANYONE can get it.. do you still have to send a request to be checked over though first?
* - Sajuuk - Sep 2, 2014
(Sep 2, 2014 03:20 PM)Mr Liam Wrote: Yeah, that's quite a shame that ANYONE can get it.. do you still have to send a request to be checked over though first?
Nope. Now there's an approval bot that generates a random number between 0 and 100. If your number is 50 or greater, you are approved. No more PMing Omni to see if you're ready. It's all about the money now.
* - Mr Liam - Sep 2, 2014
(Sep 2, 2014 03:41 PM)Sajuuk Wrote: Nope. Now there's an approval bot that generates a random number between 0 and 100. If your number is 50 or greater, you are approved. No more PMing Omni to see if you're ready. It's all about the money now.
What the fuck has happened while I've been away :(
* - WOLGA - Sep 2, 2014
(Sep 2, 2014 03:59 PM)Mr Liam Wrote: What the fuck has happened while I've been away :(
Everything but everything good has happened.
|