Re: Problem with java Rename function in solaris platform.



On 9 Mar 2006 22:09:44 -0800, drajibneed@xxxxxxxxx wrote, quoted or
indirectly quoted someone who said :

the operation was quite successfull,but in case of moving the
files(using rename() function) from local to external disk,operation

Rename is just that. It goes into the directory and changes the name
of the file leaving the data part alone. This gives the illusion of
moving the file to a different spot on the same drive. It is not
intended for moving files from drive to drive. A move is a copy
followed by delete.

There are several ways to move files.

1. use http://mindprod.com/products.html#FILETRANSFER to copy files
then use File.delete.

2. exec a platform specific script that does it. see
http://mindprod.com/jgloss/jgloss/exec.html.

3. use FileInputStreams to such files into ram and squirt them out
with FileOutputStreams. Works if files not that big.
http://mindprod.com/applets/fileio.html


--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: File renaming
    ... > moving files, just swap your last two lines of code around ... >> contain incomplete data? ... A rename will only change the "name of the inode", ...
    (comp.lang.php)
  • Re: Rename File name (logs and mdb)
    ... the database, rename the files and reattach. ... EXEC sp_detach_db 'MyDatabase' ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • RE: Renaming the SQL Server PC
    ... exec sp_addserver 'newservername', 'local' ... rename pc and restart ... "Brian" wrote: ... > has the same name as the PC, will I have to rename the SQL instance also? ...
    (microsoft.public.sqlserver.server)
  • Re: Automatically create table name
    ... the sp_rename stored procedure can help you: ... exec sp_rename 'Customer_20050708', 'Customer_20050709' ... > I want to rename table automatically .How can i do this? ... Prev by Date: ...
    (microsoft.public.sqlserver.dts)
  • Re: Rename root to avoid hacking?
    ... Noozer wrote: ... Another thing I was thinking about was to rename /bin/sh to something ... else since a lot of exploits contain an 'exec /bin/sh' in some form. ... "security" change. ...
    (comp.os.linux.security)