| 1. |
Solve : Batch with Ascii Art and FTP Login... need help? |
|
Answer» Hi, if i run asp.bat i get this error.... Your third ASCII art line has this character | This is the pipe symbol. Echo blablabla | lalala means pipe text blablabla to program lalala So the ascii art after the pipe symbol is triggering the error. Because there is no program named "___". Escape the pipe symbols with a caret so | becomes ^| Also escape < and > if you use them. Quote from: arcanus on February 13, 2012, 11:48:28 AM ok i've put the ftp stuff into another file and got just the last line in my first file...But that forces you to hard code the directory you need to change to. You cannot ask for it in your batch file now.Ok now it works... the asp.bat works well but i set on this file a path with: set /p rel= And in the ftp file i want go to this dir with cd blabla/%rel% this doesn't work... how can i make this working? greetz arCi Quote from: arcanus on February 14, 2012, 09:09:55 AM Ok now it works... the asp.bat works well but i set on this file a path with:I gave you the code in my 2nd post and then told you about your issue in my 3rd post. You need to create the FTP script on the fly with the code I gave you.i know and i make 2 files... 1 File with the asciiart in (asp.bat) 1 File with the ftp Stuff (asp.ftp) the ftp file looks like this now: Code: [Select]open xxx.xxx.xx.xx xxxxx user username password cd incoming/%rel% mget -r * quit i removed the echo. commands because it won't work with that. Here is the asp.bat file: Code: [Select]echo off echo _____ ___________________ echo / _ \ / _____/\______ \ echo / /_\ \ \_____ \ ^| ___/ echo / ^| \/ \^| ^| echo \___^|__ /_______ /^|___^| echo arCi's \/ SiTE \/ PROJECT echo. echo PRiVAT + SECURE SiNCE 2K8 echo. echo Please input a Scene-Release: set /p rel= echo. echo Release was set on ASP echo. echo Ready for Connection? (Y/N) set /p answer= if %answer% == Y goto con if %answer% == N goto end :end exit :con clear echo _____ ___________________ echo / _ \ / _____/\______ \ echo / /_\ \ \_____ \ ^| ___/ echo / ^| \/ \^| ^| echo \___^|__ /_______ /^|___^| echo arCi's \/ SiTE \/ PROJECT echo. echo PRiVAT + SECURE SiNCE 2K8 echo. echo. echo establish Connection... echo. ftp.exe -n -i -s:asp.ftp btw thx 4 your help and time u spend here... For the third time I told you that the FTP script needs to be created on the FLY by the BATCH File. I told you in my 2nd post: "This is what the end of your batch file needs to look like!" You need to use the code I gave you to create the ftp script with the batch file. You cannot have the FTP script already created!sorry i told u my english sucks... But now i've understand it... with your code the ftp file will created when i START the bat... test... and it works fine. So but now i've got the *.bat file with the user and pw inside... Is there a way to encrypt it? That no1 can read what's inside... Quote from: arcanus on February 14, 2012, 11:59:13 AM sorry i told u my english sucks... But now i've understand it... with your code the ftp file will created when i start the bat...There are programs that will take your BATCH file and wrap it into an executable. But there are plenty of issues with that. All they are really doing is creating a self extracting executable file that launches the batch file. Many of these programs extract the batch file to a temporary folder which then becomes the working directory. If you are trying to DOWNLOAD files to the directory that the executable is launched from it will end up downloading them to the temporary folder that batch file was executed from. You could always just prompt for the username and password in the batch file and echo those variables to your script.Yes i try bat2exe or bat2com but the created exe or com-file doesn't work well... Maybe it's rly the best to make a prompt for user/pass... Ok thx 4 all Squashman Whoooshe... |
|