China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 04:28
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to refer to Local Settings + 8.3 naming method View 979 Replies 8
Original Poster Posted 2010-06-16 11:58 ·  中国 吉林 长春 电信
初级用户
Credits 52
Posts 27
Joined 2006-10-27 16:42
19-year member
UID 68509
Gender Male
Status Offline
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 ]
Floor 2 Posted 2010-06-16 12:01 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 3 Posted 2010-06-16 12:19 ·  中国 吉林 长春 电信
初级用户
Credits 52
Posts 27
Joined 2006-10-27 16:42
19-year member
UID 68509
Gender Male
Status Offline
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?
Floor 4 Posted 2010-06-16 12:28 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
Just put it in quotes. If you want the 8.3 format, just use
dir /x and list it out yourself.
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 5 Posted 2010-06-16 12:44 ·  中国 吉林 长春 电信
初级用户
Credits 52
Posts 27
Joined 2006-10-27 16:42
19-year member
UID 68509
Gender Male
Status Offline
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~~
Floor 6 Posted 2010-06-16 13:22 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
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.
Floor 7 Posted 2010-06-18 07:35 ·  中国 湖南 长沙 电信
新手上路
Credits 7
Posts 6
Joined 2010-06-10 18:53
16-year member
UID 168549
Gender Male
Status Offline
Then the final code should be:
del "C:\Documents and Settings\Administrator\Local Settings\Application Data\IconCache.db" /a
Floor 8 Posted 2010-06-18 08:48 ·  中国 上海 电信
高级用户
★★★
Credits 916
Posts 377
Joined 2004-03-08 00:00
22-year member
UID 19523
Gender Male
Status Offline
Use the .cmd extension. Under Windows, .bat is rarely used.
When packaging with iexpress, the commands invoked for these two extensions are different.


Looks like tomorrow I'll have to distribute mp3directcut again. I wanted to use Windows iexpress for distribution, and ran into a small problem. Only today did I notice the difference between the .bat and .cmd extensions.
c:\windows\system32\command.com
c:\windows\system32\cmd.exe
Although command /? gives the same help text, when executing it still says improper command line usage.
Floor 9 Posted 2010-06-20 13:51 ·  中国 北京 鹏博士BGP
新手上路
Credits 1
Posts 1
Joined 2010-06-19 21:33
16-year member
UID 169169
Gender Male
Status Offline
Use dir /X to display it and you'll know the 8.3 name.
Forum Jump: