Click here to Skip to main content
15,891,734 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
Hi, everyone. Always thanks for your help.

Well, I've made simple explorer but there is some problem. With my explorer, I wanna rename "C:\Users\...\My Music" folder's name so I used SHFileOperation() function like this.
C++
sfo.hwnd = m_hSelf;
sfo.wFunc = FO_RENAME; 
sfo.pTo = szCurStr;
sfo.pFrom = szOldStr;
sfo.fFlags = FOF_SILENT;
nFlag = SHFileOperation(&sfo);
bError = sfo.fAnyOperationsAborted;

Process that code, the "My Music" folder name is not changed yet. But name on property is changed.

Name displayed on "My Music" folder's property->General is also "My Music" but
name displayed on "My Music" folder's property->Sharing, Security, Location is changed to new name.

What is wrong?

---------------------------------------------------------

Well, I can rename "My Music" folder's name on Windows Explorer but using that code, I can not do this.
Please, help me.
Posted
Updated 11-Nov-13 23:15pm
v3
Comments
Richard MacCutchan 12-Nov-13 6:38am    
I think these folders have special hidden properties that prevent you from changing them.
WuRunZhe 12-Nov-13 7:14am    
Yes, you are right. "My Music" is the special folder under "Libraries\Music\" on Windows 7.

But I mentioned on the question, I can rename it on Windows Explorer.
KarstenK 12-Nov-13 9:09am    
it can be an "update" issue: "some commit" or "flush" actions needs to be taken. Search the Shell-API for details
WuRunZhe 12-Nov-13 19:47pm    
Sorry, It's not issue.
On OS Win7, "My Music" folder name can not change. Even though I've changed folder name on Windows Explorer, file's path which in "My Music" is not changed yet.
Thank you for your help.

1 solution

It's not mistake. Sorry.

SQL
On OS Win7, "My Music" folder name can not change. Even though I've changed folder name on Windows Explorer, file's path which in "My Music" is not changed yet.
Thank you for your help
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900