IOfflineFilesCache::RenameItem method
Renames an item in the cache. This method logs a request with the Offline Files service for a path to be renamed on the next system restart.
Note On Windows Server operating systems beginning with Windows Server 2008 R2, the Offline Files COM API and WMI provider are available only if the Desktop Experience feature is installed.
Syntax
HRESULT RenameItem( [in] LPCWSTR pszPathOriginal, [in] LPCWSTR pszPathNew, [in] BOOL bReplaceIfExists );
Parameters
- pszPathOriginal [in]
-
Fully qualified UNC path of the item (server, share, file or directory) to be renamed.
- pszPathNew [in]
-
The new path to replace pszPathOriginal if the item that pszPathOriginal points to exists in the cache.
- bReplaceIfExists [in]
-
This parameter is reserved for future use.
Return value
Returns S_OK if successful, or an error value otherwise.
Remarks
This method requires system administrator privilege.
Note A restart of the system is necessary for the rename operation to be applied to the Offline Files cache.
This method fails if the path referenced by the pszPathNew parameter already exists in the Offline Files cache.
Another method that you can use to rename an item is the IOfflineFilesCache2::RenameItemEx method. It does not require system administrator privilege or a system restart. However, it will fail if the item is currently in use.
Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008: This method is not supported until Windows 8 and Windows Server 2012.
Requirements
|
Minimum supported client | Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 [desktop apps only] |
|
Header |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012