Our Products:
CompleteFTP
edtFTPnet/Free
edtFTPnet/PRO
edtFTPj/Free
edtFTPj/PRO
Login
Remember
Google Login
Register
All Activity
Questions
Hot!
Unanswered
Tags
Categories
Ask a Question
Ask a Question
FTP/SFTP file move
0
votes
12k
views
asked
Oct 27, 2008
in
Java FTP
by
safraz
(
320
points)
Hi,
Is it possible for file move within the same FTP/SFTP server with editFTPj/PRO Version 2.1.0.
If so, please provide me the code.
Thanks in advance,
Regards,
Safraz
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
4
Answers
0
votes
answered
Oct 27, 2008
by
support2
(
162k
points)
It depends on the server - try renaming it (using the old path, and the new path).
Please
log in
or
register
to add a comment.
0
votes
answered
Oct 27, 2008
by
safraz
(
320
points)
i have used
ftp.rename("test.txt", "date\test.txt");
I'm getting following exception;
com.enterprisedt.net.ftp.FTPException: RNTO failed...
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.rename(Unknown Source)
at lk.informatics.editftpj.ftp.FTPTest.main(FTPTest.java:55)
INFO [FTPControlSocket] 27 Oct 2008 14:10:38.062 : Expected reply code = [250]
Any Suggestion?
Please
log in
or
register
to add a comment.
0
votes
answered
Oct 27, 2008
by
support2
(
162k
points)
Try using the full paths:
ftp.rename("/home/usr/abc/test.txt", "/home/usr/date/test.txt");
where of course you need to use the correct paths.
You can find out the paths by using a command line client and typing 'pwd'
Not all FTP servers permit the above, but many do.
Please
log in
or
register
to add a comment.
0
votes
answered
Oct 28, 2008
by
safraz
(
320
points)
It works with the absolute path
Thanks for your quick reply
Please
log in
or
register
to add a comment.
Categories
All categories
Products
(2.8k)
CompleteFTP
(418)
Java FTP
(1k)
.NET FTP
(1.4k)
FAQ
(120)
General
(178)
Feature Requests
(21)
...