![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 04:26 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] How to change the icon for a malformed directory? |
| Printable Version 879 / 7 |
| Floor1 lksba | Posted 2009-06-30 19:37 |
| 初级用户 Posts 10 Credits 21 | |
|
Under XP
we can use rd md..\ and similar commands to create all kinds of malformed folders but we can't use the right-click "Customize Folder" function to assign some other custom icon to them My idea was to first create a normal directory asdf then change the custom icon and finally rename the folder but I don't know why when I use ren asdf md..\ the command won't work the result is that the folder gets renamed to the md folder Could an expert please explain why this is? Also, is there any way to make a custom icon work for a malformed directory? |
|
| Floor2 wxcute | Posted 2009-07-01 01:44 |
| 中级用户 Posts 211 Credits 458 | |
|
No.
|
|
| Floor3 yishanju | Posted 2009-07-01 02:37 |
| 银牌会员 Posts 1,357 Credits 1,488 | |
|
Desktop.ini
[.ShellClassInfo] IconFile=%SystemRoot%\system32\SHELL32.dll IconIndex=27 Create a similar INI file like this; it seems the icon can be changed after a reboot Just change a normal folder and look at how the INI file changes, that should do it |
|
| Floor4 s11ss | Posted 2009-07-01 05:58 |
| 银牌会员 Posts 566 Credits 2,098 | |
|
1. Create folder a, assign an icon
2. Copy folder a, rename it to b 3. ren b "a../" |
|
| Floor5 zh159 | Posted 2009-07-01 07:50 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
|
You also have to use attrib +s to add the system attribute to the directory...
But this kind of directory seems to be ineffective [ Last edited by zh159 on 2009-6-30 at 18:52 ] |
|
| Floor6 radem | Posted 2009-07-02 01:34 |
| 高级用户 Posts 383 Credits 691 | |
|
The methods from 3L and 4L are both useless for changing the icon of folders ending with a dot
|
|
| Floor7 bluewaterx | Posted 2009-07-04 03:43 |
| 初级用户 Posts 68 Credits 132 | |
|
...\ much smarter than a..\, you can't even see it try md ...\
F:\BAK\DOS>md ...\ F:\BAK\DOS>rd ...\ This is a batch file to search the whole disk for ...\ folders @echo off setlocal enabledelayedexpansion title made in 2009-4-11 set strLine=---------------------------------------- :FolderFlag cls&set hideFolder=0&set hideFolder=0&set driveList= echo.&echo !strLine! [...malformed folder capture]&echo. for /f "delims=\" %%i in ('fsutil fsinfo drives^|find /v ""') do ( set var=%%i set drive=!var:~-2! fsutil fsinfo drivetype !drive!|find "固定">nul && set driveList=!driveList! !drive!) for %%i in (!driveList!) do ( if exist %%i\...\nul set /a hideFolder+=1&echo [!hideFolder!]. %%i\...\&set ctrlHideFolder!hideFolder!=%%i\...\&echo. for /f "delims=" %%j in ('dir /ad /b /s %%i\') do ( if exist %%j\*..\nul set /a hideFolder+=1&echo [!hideFolder!]. %%j\*..\&set ctrlHideFolder!hideFolder!=%%j\*..\&echo. if exist %%j\...\nul set /a hideFolder+=1&echo [!hideFolder!]. %%j\...\&set ctrlHideFolder!hideFolder!=%%j\...\&echo.)) if not !hideFolder! equ 0 ( echo !strLine! [ F? - view X - exit ]&echo. set cFolder=&set /p cFolder= Please choose: for /l %%i in (1,1,!hideFolder!) do if /i "!cFolder!"=="f%%i" start "" "!ctrlHideFolder%%i!" if /i "!cFolder!"=="x" exit ) else echo [...-type malformed folders found on local disks]&echo.&echo !strLine! [!date! !time! ]&echo.&pause>nul goto FolderFlag |
|
| Floor8 radem | Posted 2009-07-04 04:47 |
| 高级用户 Posts 383 Credits 691 | |
|
md ...\ can't be used on the NTFS file system
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |