Question

7
Replies
2028
Views
NaveenM4289 Member since 2015 39 posts
HSBC
Posted: 4 years ago
Last activity: 4 years 5 months ago
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
Share this page LinkedIn