Hi,
Chitra
I did a cut and past of your code in one of
our servlet to test the move command on the unix system
It works fine with out any error!!!
Note that you have to specify the complet path of
the source file and the destination file from the root of the
unix system.
i.e if u have a file called chitra.txt in your home directory
to move it to ch.txt you have to specify
(assuming your home directory = /project/users/chitra)
sourcefile = /project/users/chitra/chitra.txt
destfile = /project/users/chitra/ch.txt
(If your are not specifing the full path its not going to
move nor going to give u any errors!!!!)
make sure that permissions on the files are such that it
is possible for the owner of the Servlet Engine to move the
file from one name to other.
BTW please specify the servers on which your
are working in brief this will help for any one who are trying
to answer!
The specs of servers are
NetscapeEnterpriseServer3.5.1
ServletExece2.0
hope this helps
H.M.Mallik
>From: Chitra Jain <[EMAIL PROTECTED]>
>I am trying to move files using the "mv" command on Unix from a
servlet
>where the names of the files
>are passed in as parameters.
>
>This is what I have in my moveFiles(String sourceFile, String
destFile)
>method
>
>Runtime rt = Runtime.getRuntime();
>Process proc = null;
>
>String[] command = {"mv", sourceFile, destFile};
>proc = rt.exec(command);
>
>But for some reason I can't get it to work. There are no errors
returned
>from the system either
>What am I doing wrong here. Any pointers ?.
>Thanks in advance.
>
>Chitra
>
>_____________________________________________________________________
______
>To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources:
http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html