Question

7
Replies
2083
Views
Close popover
Naveen Mekala (NaveenM4289)
HSBC

HSBC
IN
NaveenM4289 Member since 2015 40 posts
HSBC
Posted: May 6, 2016
Last activity: May 16, 2016
Closed
Solved

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.

Data Integration System Administration
Moderation Team has archived post