You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to rename a file. So, I have a file named abc.txt in the server: server.com, shareName= share, directory path=dir/1/2/3/4
I am using the below code. I have the session declared as a common variable and I am able to get the file content, upload a file, remove a file, list the files in the above directory. But for some reason gives the error STATUS_OBJECT_PATH_NOT_FOUND although it is available.
public class renameFile {
private static final Logger logger = LoggerFactory.getLogger(renameFile.class);
public static String urlFix(String s) {
return s.replace('/', '\');
}
public static void renameTo(String sessionId, String oldFileName, String newFileName, String path, String shareName) {
I found that the reason is because the actual path is on a DFS, although the path I use above is correct and works for get File, download, upload, it doesn't work for rename. But when I used the same for the underlying dfs path, it worked. So could you please investigate why it is not working?
I am trying to rename a file. So, I have a file named abc.txt in the server: server.com, shareName= share, directory path=dir/1/2/3/4
I am using the below code. I have the session declared as a common variable and I am able to get the file content, upload a file, remove a file, list the files in the above directory. But for some reason gives the error STATUS_OBJECT_PATH_NOT_FOUND although it is available.
public class renameFile {
private static final Logger logger = LoggerFactory.getLogger(renameFile.class);
public static String urlFix(String s) {
return s.replace('/', '\');
}
public static void renameTo(String sessionId, String oldFileName, String newFileName, String path, String shareName) {
}
The path is same, just changing the filename. Please help here.
The text was updated successfully, but these errors were encountered: