public void doMove(File fileToMove,File destinationFile)
{
boolean success = fileToMove.renameTo(destinationFile);
if(success)
{
CommonLog.updateCommonLog("Moving File", "File Moved - success", true, false) ;
}else
{
CommonLog.updateCommonLog("Moving File", "File Moved - failed", true, false) ;
}
// File (or directory) with old name
File file = destinationFile;
// File (or directory) with new name
File file2 = new File(propData.getProperty("Mapped_Network_Folder")+"Silverpop_Incremental.zip");
// Rename file (or directory)
boolean successful = file.renameTo(file2);
if(successful)
{
CommonLog.updateCommonLog("Changing File Name", "File Name Change - success", true, false) ;
}else
{
CommonLog.updateCommonLog("Changing File Name", "File Name Change - failed", true, false) ;
}
}
|