2

I have to put some specific icons on folders and I had success doing that over all folders except the one that have some special characters. I'm using windows7.

How it is done?

  1. creating a .ini file within the folder;
  2. running a command-line changing the attrib +s of that folder.

The only problem is on 2.

This works fine:

attrib +s "C:\Users\Public\cato"

This doesn't work and returns 'Path not found':

attrib +s "C:\Users\Public\cáto"

I have tried to do this:

attrib +s "C:\Users\Public\cáto\"
attrib +s "C:\Users\Public\c^áto"
attrib +s "C:\Users\Public\c^áto\"

and the problem persists.

What can be done in this spacial characters over folder names?

PS: This is the desktop.ini file I save in the folder (1.) before running the command-line. Its [name].[ext] is 'desktop.ini' and its content is:

[.ShellClassInfo]
IconResource=%windir%\system32\imageres.dll,101
[ViewState]
Mode=
Vid=
FolderType=Pictures

1 Answer 1

2

I've just tested attrib and several other commands with filenames with Unicode characters, and all of them worked fine:

D:\>dir D:\Test
11/02/2016  16:42                 0 Eyjafjallajökull.txt
11/02/2016  16:42                 0 Schrödinger.txt
11/02/2016  16:43                 0 àèìòù.txt

D:\>attrib +s D:\Test\Eyjafjallajökull.txt
D:\>attrib +s D:\Test\Schrödinger.txt
D:\>attrib +s D:\Test\àèìòù.txt

D:\>attrib D:\Test\*
A  S         D:\Test\Eyjafjallajökull.txt
A  S         D:\Test\Schrödinger.txt
A  S         D:\Test\àèìòù.txt

Whatever your problem is, it doesn't seem to have anything to do with Unicode characters...


Out of curiosity, I've made another test in your exact same situation: using a folder with a custom icon and Unicode characters in its name, I've used attrib both on the "desktop.ini" file in the folder, and also on the folder itself:

D:\>Dir D:\Tèst /a
11/02/2016  17:25                68 desktop.ini

D:\>type d:\Tèst\desktop.ini
[.ShellClassInfo]
IconResource=C:\Windows\system32\SHELL32.dll,16

D:\>attrib -h -s D:\Tèst\desktop.ini

D:\>attrib D:\Tèst\desktop.ini
             D:\Tèst\desktop.ini

D:\>attrib +s D:\Tèst

D:\>attrib D:\Tèst
   S R       D:\Tèst

As you can see, it worked perfectly.

6
  • Thanks for the answer. It seams you have tested only changing icons in files. Have you tried in over Folders? Feb 11, 2016 at 15:51
  • Same behavior with folders. And please stop talking about "icons", those are files and filenames :) their content is not relevant to applying attributes to them.
    – Massimo
    Feb 11, 2016 at 15:55
  • Have you tested on windows 7? "Icons" is the name windows uses when opening the folder properties panel (> costumize > folder icons subpanel) Feb 11, 2016 at 16:14
  • Same result on Windows 7 and 8.1, and I even tried it on an old Windows Server 2003 machine, it still worked perfectly; Unicode has a long history of being supported on Windows. Your problem must lie elsewhere, not in the file name.
    – Massimo
    Feb 11, 2016 at 16:20
  • Also, see the edit for another test more similar to your actual situation. As you can see, everything seems to work as expected.
    – Massimo
    Feb 11, 2016 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .