中国DOS联盟论坛

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 05:24
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » How to refer to Local Settings + 8.3 naming method
Printable Version  981 / 8
Floor1 48344620 Posted 2010-06-16 11:58
初级用户 Posts 27 Credits 52
C:\Documents and Settings\Administrator\Local Settings\Application Data\IconCache.db
I wanted to delete this file.
Tried using Local~1, didn't work; Local*~1 can get into it. But in a batch file, applic~1 still won't go in.
And then there's All Users too.
Why is this? Been looking for ages and still no answer...

[ Last edited by 48344620 on 2010-6-16 at 12:46 ]
Floor2 slore Posted 2010-06-16 12:01
铂金会员 Posts 2,478 Credits 5,212
Floor3 48344620 Posted 2010-06-16 12:19
初级用户 Posts 27 Credits 52
Many thanks for the reminder from the poster above.
I just tried again and it still didn't work. After looking at the prompt I realized it said the file couldn't be found (IconCache.db is hidden) hoho
Looks like I need to attrib it first..
Wonder if this has an 8.3 way to refer to it, or a variable-based way?
Floor4 slore Posted 2010-06-16 12:28
铂金会员 Posts 2,478 Credits 5,212
Just put it in quotes. If you want the 8.3 format, just use
dir /x and list it out yourself.
Floor5 48344620 Posted 2010-06-16 12:44
初级用户 Posts 27 Credits 52
Ah, I found out I'm really unbelievably dumb, messed with this for two hours....
Makes me want to find a block of tofu and smash my head into it...

==========
A few years ago I didn't know shortcuts were represented by *.lnk, and it took me several days before I thought of using dir to list them...
Made the same mistake again...

Many, many thanks to the poster above~~
Floor6 Hanyeguxing Posted 2010-06-16 13:22
银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂
del itself can recognize 8.3 names, but since the OP wants to delete a hidden or system file, the /a parameter must be used. If /a is not used, del will not delete files with hidden or system attributes.
Floor7 treesingwind Posted 2010-06-18 07:35
新手上路 Posts 6 Credits 7
Then the final code should be:
del "C:\Documents and Settings\Administrator\Local Settings\Application Data\IconCache.db" /a
Floor8 dato Posted 2010-06-18 08:48
高级用户 Posts 377 Credits 916
Use the .cmd extension. Under Windows, .bat is rarely used.
When packaging with iexpress, the commands invoked for these two extensions are different.


Floor9 reyly Posted 2010-06-20 13:51
新手上路 Posts 1 Credits 1
Use dir /X to display it and you'll know the 8.3 name.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023