2018-01-29, 12:05
Hi,
I have a network drive mapped on Windows (actually it is VMware shared folder).
I try to rename file on that drive with following code:
and I get following error in log:
I can copy the same file from and to this share using xbmcvfs.copy().
Can be this fixed somehow?
I can try to use os.rename() but this should work also over smb: shares and that seems not to be supported.
BR,
bkiziuk
I have a network drive mapped on Windows (actually it is VMware shared folder).
I try to rename file on that drive with following code:
python:originalinputfile = "Z:\Shared_folders\The test file.txt"
try:
success = xbmcvfs.rename(originalinputfile, originalinputfile + '_')
xbmc.log("rename_file: SuccessStatus: " + str(success), level=xbmc.LOGINFO)
except Exception as e:
xbmc.log("Can't rename file: " + originalinputfile, level=xbmc.LOGERROR)
xbmc.log("Exception: " + e.errno + " - " + e.message, level=xbmc.LOGERROR)
and I get following error in log:
python:10:14:52.977 T:3124 ERROR: Failed to rename file/directory \\?\Z:\Shared_folders\The test file.txt to \\?\Z:\Shared_folders\The test file.txt_, Error:
10:14:52.977 T:3124 ERROR: XFILE::CFile::Rename - Error renaming file Z:\Shared_folders\The test file.txt
10:14:52.977 T:3124 INFO: rename_file: SuccessStatus: 0
I can copy the same file from and to this share using xbmcvfs.copy().
Can be this fixed somehow?
I can try to use os.rename() but this should work also over smb: shares and that seems not to be supported.
BR,
bkiziuk