Opening FTP connection using a bat file by Runtime class

Hi
I'm trying to run the following file from Runtime.getRuntime().exec(XXX) command and getting an error saying that login failed.
I have set the user id and password in the ftpcommand.bat file as below
User nkamar
pass narendra
and when I run this bat file from command prompt it doesn't work why???.It says Login failed.
C:\>ftp -s:ftpcommand.bat 134.133.210.24
Connected to 134.133.210.24.
220 sdqa33 FTP server (SunOS 5.6) ready.
User (134.133.210.24:(none)):
331 Password required for User nkamar.
530 Login incorrect.
Login failed.
ftp> opsnet1
Invalid command.
ftp> Invalid command.
can you please help me in resolving this.
A sample example file for setting the username,pwd and opening the ftp connection would be very helpful.
Thanks in advance.
Regards,
Narendra.

Rewrite your script as follow:
open 134.133.210.24
nkamar narendra
Save it as ftpcommand.scr then call it.
C:\>ftp -s:ftpcommand.scr
If this still does not work try rewritting the script as follow:
open 134.133.210.24
user nkamar
password narendra
Save it and try again.
Hope this works.
ER

Similar Messages

  • Can we make a data connection using a WADL file?

    Can we make a data connection using a WADL file for REST web services?

    Can we make a data connection using a WADL file for REST web services?

  • Is it possible to have a secure FTP connection using private key authentication?

    Is it possible to have a secure FTP connection using private key authentication to connect to a folder on Business Catalyst?

    Hi,
    Not available at this stage as the only options can be found in the SFTP set-up article.
    - http://helpx.adobe.com/business-catalyst/partner/connecting-site-using-ftp-client.html
    Kind regards,
    -Sidney

  • Usb drive - ftp connects but no folders/files listed

    I am sure it is something on my end, but I can't get any folders/files to show up when i ftp to my conencted usb drive.
    In the linksys control panel, I have created users along with passwords. I created one user with read/write capabilities and another with just read capability.
    using both a browser and cuteftp, i can connect to either account with no problem, but no files show up , it is just blank.
    Thinking it may be a directory issue, I connected using cuteftp and pointed it at the directory i wanted . Again, it connected just fine but no files were listed (it is all music files)
    When I am connected, with cuteftp, it appears to show me in the root directory just a / - which is why i tried pointing it to the correct directory /music.......
    I am connecting using port 21 as shown in the linksys control panel.
    any suggestions appreciated.
    I do have access to the drive locally in my network. All of my computers can see it and share the files.....just can't get the ftp to work.
    thanks

    Have you assigned correct shares to those users you have created? And can you also give the exact model / brand of your device so it would be easier for other users as well.
    If everyone needs to believe in something, I believe I'll have another beer..

  • Using a .bat file to use Values in Registry from another Registry

    I recently starting working in an IT Department and for years my superiors/co-workers have always had a piece of software called "cyt.exe".
    When ever I logged in someones computer as Admin, this software allowed me to log out with their username still in the log in text box. We recently upgraded a large quantity of systems to Wins7 and WinEmbedded7 and that program no longer works due to the
    registry change.
    Currently the best I could to for replicating that software function as .bat file is:
    call reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnSAMUser /t REG_SZ /d "domain/username" /f
    call reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnUser /t REG_SZ /d "doamain/username" /f
    pause
    When I log out, it leaves the user name and password blank which is OK but I need to take it one step further. I need the values of:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI
    "LastLoggedOnSAMUser"="domain\username"
    "LastLoggedOnUser"="domain\username"
    to match the values that are in
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData\1
    "LoggedOnSAMUser"="domain\username"
    "LoggedOnUser"="domain\username"
    Any suggestions on what I need to change in my code to manipulate the registry to match those values without having to manually input them?

    - Vegan Fanatic
    "can you fix the cyt.exe program, that would be the best option long term"
    Well the cyt.exe program hasn't been updated since 2000 (version 2.3 and 2.5 were the latest versions) so I can only assume the developer has abandoned the project. The reason why it doesn't work anymore is because of the registry change going from XP to
    Vista/Win7/Win8.
    Once I have my own batch file, it will be easier to tweak it as needed when an operating system changes then it is to rely/wait on someone else to update a very specific piece of software that only has one small purpose that has most likely been forgotten.
    As much as I would like to modify the existing program, I don't have any software I can use to re-program it and I doubt I have enough knowledge or experience to tweak it correctly.
    - Frederik Long
    "You need to experiment either with reg query / reg add or reg export / reg import. Each of these commands has inbuilt help, e.g. reg import /?."
    From what I tested, the export/import copies the file and its values and placed them where I asked it too. That is not what I need. I need the values ONLY and placed within the file I need which has a different name from the file I exported from.

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • How to use a bat file to change plug-in control panel settings?

    Hi,
    The company I work at has old applications that rely on the MS JVM shipped with IE so we cannot activate the Sun Java plug-in for all users.
    The applet we are developing has to write to disk and thus has to be signed. We do therefore need to run a modern Java version for our users. We have about 5000-7000 users so we would need to create a bat file that would automatically be run for our users. That bat would set that the Sun Java plug-in will be used for Intenet Explorer.
    Does anyone know which (registry-?) setting it is that is changed when the Internet Explorer box is checked in the Java plug-in control panel?
    All help is greatly apprechiated.
    Best regards,
    Helena

    Try this one:
    HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\1.5.0_06
    Where the 1.5.0_06 might be a different version.
    There is a value named UseJava2IExplorer. 1 is enabled (Sun's), 0 is disabled.

  • Ftp connection using java

    Hi All,
    I need to upload a file through ftp connection uisng java calss. any one know please reply me
    Thanks
    K.Kalikumar

    Hi Kali,
    I have worked on similar issues sending you the code.. hope it should work. I had written a TelnetInterface class where I did all operation inside the constructor.
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.InputStream;
    import java.io.PrintStream;
    import org.apache.commons.net.telnet.TelnetClient;
    public class TelnetInterface {
         private TelnetClient telnet = new TelnetClient();
         private InputStream in;
         private PrintStream out;
         private String prompt = ">";
         private boolean isConnected ;
    public TelnetInterface(){
         public TelnetInterface(HttpServletRequest request) {
                   HttpSession session = request.getSession();
                   PropertyReader propReader = (PropertyReader)session.getAttribute("propReader");
                   String host=null,user=null,password=null,port=null;
                   int unixPort= 0;
    //                Get Unix credentials
                   if(propReader != null){
                        host=(String)propReader.getProperty("UNIX_HOST");
                        user=(String)propReader.getProperty("UNIX_UNAME");
                        password=(String)propReader.getProperty("UNIX_PWD");
                        port=(String)propReader.getProperty("UNIX_PORT");
                        unixPort = Integer.parseInt(port) ;
    //                    Connect to the specified server
                   System.out.println("Inside telnet Interface");
                   try{
                        telnet.connect(host, unixPort);
                        isConnected = true;
                        in = telnet.getInputStream();
                        out = new PrintStream(telnet.getOutputStream());
    //                    Log the user on
                        readUntil("login: ");
                        write(user);
                        System.out.println("user:"+ user);
                        readUntil("Password: ");
                        write(password);
                        System.out.println("password:"+ password);
                        sendCommand("su - loginuser");
                        su(" password");
                   }catch (IOException e) {
                        e.printStackTrace();
                        isConnected = false;     
                   }catch (Exception e){
                        e.printStackTrace();
         }

  • How to create a .bat file to run *.class files?

    Hello.
    I have compiled java *.class files.
    I would like to make a shortcut on my desktop to run my Java programs.
    How to write a shortcut (.bat file or something else) to run Java programs?
    Thanks

    1) Make it into an executable jar file (internet search for "java executable jar" will give you lots of help)
    2) Write a batch file. If you do not know how to do this, a Java forum is not the place to find out. Do an internet search or find a windows support site.

  • Use of BAT file - How do you completely delete 150 phones and their associate DNs?

    How do you completely delete 150 phones and their associate DNs? All the phones are in the same device pool. I prefer BAT way.
    Version of the CUCM: 8.6.2
    Type of phones: 7962 phones - associated with the same device pool.
    Additinal questions: Is there a way to delete elegantly all the phones and their associated DNs when all the phones are associated to the same device pool? I rather not work with specific extensions and MAC addresses.
    Thank you,
    Calin Lupas

    Hi Calin,
    Using BAT this will require 2 - passes. 1 for the phones and 1 for "unassigned DN's". this is nicely shown in the attached doc;
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/bat/8_0_1/bat-801-cm/t03delph.html#wp1342774
    Of course for the DN's you could delete them via the Route Plan report>Unassigned DN>select all>Delete
    Cheers!
    Rob

  • Connect DB through BAT file

    set /p SName=Server Name :
    set /p UName=User Name :
    set /p Pwd=Password :
    set /p DbName=Database Name :
    Can i set permanently or one time above details in batch file instead of given again and again while we execute the batch file to execute the DB scripts

    Did you try using sqlcmd? You can pass credentials  and execute the sql file. 
    for example
    C:\Program Files\Microsoft SQL Server\100\Tools\Binn>SQLCMD.EXE -S hqdbsp18 -i " C:\TestCmd.sql" -d "master" -U xyz -P abcd1234
    http://technet.microsoft.com/en-us/library/ms165702(v=sql.105).aspx
    --Prashanth

  • How can I use an java based app that starts via an inf or bat file?

    I have java exe application that is started using a .bat file and a java exe application that is started using an inf file. Both the .bat and inf prevent the respective application from kicking off.  Is there a way to convert these file types so that they execute on  my MacBook?

    I didn't expect you to have your customer run the command. I would expect you to create the executable and install it. However, there wouldn't be any difference in what you are creating and the .jar file. Either way it is a faceless icon. For that matter, it is no different than a batch file on Windows. I'm not sure what they wouldn't understand with, "copy the Vocab.jar file to wherever you want and double-click it to run the program." In addition, you probably ought to point out that Java is not installed on Mac OS X Lion (10.7.x) and when they double-click the jar file (or whatever you send them), the system will ask if they want to install Java.
    What you really need to do is package up the app inside a Mac application package and provide the user with the application on a .dmg (disk image). Take a look here: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Jar_Bundle r/Introduction/Introduction.html#//apple_ref/doc/uid/TP40000884
    I also found this which uses ANT to create the bundle: http://informagen.com/JarBundler/

  • FTP Access over .bat file

    Hi,
    I am trying to access to a ftp server using a Batch file i wrote. The Batch file works, if i start it manually. However, if i call it using the System exec.vi  (giving it to the command line input, as working directory the directory where the batch file is in) it doesnt work, I just see the cmd.exe window doin nothing (i can also not write anything in, its just black) i waited for some minutes but nothing happens, do you know what this could be ?
    Or better, how i could solve it ?
    thank you,
    Blanky

    Hi Blanky,
    try this. This works for me. It load the file, but because i have an empty file i get an error message, but it should work for you.
    The path shall be a path to a directory (without the filename).
    Hope it helps.
    Mike
    Message Edited by MikeS81 on 07-03-2008 03:59 PM
    Attachments:
    Unbenannt1.PNG ‏7 KB

  • Easier to launch using bat files?

    Isn't it really easy to launch Java using a bat file? There seems to be alot of discussion regarding exe files etc. but it seem to me that it works well using a bat file. That way you can use the -cp to set the classpath too if needed.
    Would it be possible to write code that checks the JVM and prompts the user to download the version required? Or possible to write a bat to launch a Java file, or even an applet to do the same thing.
    I need to distribute an application at work, but the install can't be any harder than a couple of clicks!
    Thanks,

    On the subject of jar files; I am having trouble
    running my app through a jar file because are probs
    with the manifest file. I know that I have to edit my
    manifest file to name, I believe, the method of my
    main class.
    howover , I did edit this file ( checked via textpad)
    and it had the two entries - one the default spiel
    about version and
    2) the line Main-Class: my methodyou have to enter the class name (without fileextension), not a method name.
    Main-Class: MyOwnClass

  • Opening connection using full path.

    Hello.
    How do i open database connection using the database full path ?
    Thanks, Tal.

    both examples don't use full database path.
    in those cases you should declare a DSN or ODBC first.
    it is not what i am looking for.
    i want to specify the exact path to my database.
    thanks, tal.
    p.s.
    are the duke dollars are given automaticly or should i give them after someone has replied to me ? (if the second option is the right one, than OOPS).

Maybe you are looking for