Question
Tech Mahindra
CA
Last activity: 16 May 2016 2:12 EDT
Unable to delete the file from server
We are using PRPC 6.1 SP2. We have a requirement to save a file into server and we could able to save using connect-file and file has to be deleted from server location in case of exception scenario but we could not able to delete file in exception scenarios.
Server path and file name is like /a/b/c/xyz.txt
we used the below code to delete file
PRFile uploadedFile = new PRFile(SavedFile);
oLog.error(uploadedFile.exists());
if(uploadedFile!=null && uploadedFile.exists()){
oLog.error("Inside Server delete");
uploadedFile.delete();
}
uploadedFile.exists() method returns false and we could not able to delete the file. All privileges are given for the file in server. Please advise.