Hi,
(My requirement is copy a file from one location to another location then delete the file from original location)...when i use the following mechanism
String objDelFileFROM = SourceFileName;
String objDelFileTO= DestinationFileName
FileInputStream from = new FileInputStream(objDelFileFROM );
FileOutputStream to = new FileOutputStream(objDelFileTO);
byte[] buffer = new byte[4096];
int bytes_read;
while((bytes_read = from.read(buffer)) != -1)
{ // Read bytes until EOF
to.write(buffer, 0, bytes_read);// write bytes
}
**File is copied by using above mechanism **
if(objDelFileFROM.exists())
{
objDelFileFROM.delete();
}
objDelFileFROM.exists()is returning false...please any one let me know why bjDelFileFROM.exists() is returning false.
Thanks
Sravan