中国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-01 22:13
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS批处理 & 脚本技术(批处理室) » Another tough one for everyone. This program has to be finished by tomorrow morning!
Printable Version  1,245 / 6
Floor1 molicn Posted 2006-07-02 01:27
初级用户 Posts 44 Credits 134
Describe how to delete junk files in the following file paths
C:\WINDOWS\Downloaded Program Files\
C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files
C:\Documents and Settings\Administrator\Local Settings\
C:\Documents and Settings\Administrator\Local Settings\Temp
The DEL command does not work
And changing the attributes doesn't work either. It says the path cannot be found! Which expert can give me the key point?
I've already done half of the batch file, only the above is left.
del C:\WINDOWS\Temp\*.*/p
del C:\WINDOWS\Downloaded Program Files\*.*/p
del C:\WINDOWS\Tasks\*.*/p
But the above files cannot find the path,

[ Last edited by molicn on 2006-7-2 at 01:29 ]
Floor2 fastslz Posted 2006-07-02 11:11
铂金会员 Posts 2,315 Credits 5,493 From 上海
del “C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\*.*" /p
del "C:\WINDOWS\Downloaded Program Files\*.*" /p
Folders with spaces must be enclosed in “”
Floor3 molicn Posted 2006-07-02 13:05
初级用户 Posts 44 Credits 134
I tried it, it said the path couldn't be found. Brother, I only gave everyone this tough problem because the above batch commands didn't work when I tried them.
Floor4 fastslz Posted 2006-07-02 13:57
铂金会员 Posts 2,315 Credits 5,493 From 上海
The Temporary Internet Files and Temp folders are not fixed. You should use variable paths such as %TEMP%, look up the related variable names in the registry, or google it. Some of them can be obtained in cmd with set.
Floor5 namejm Posted 2006-07-02 13:57
荣誉版主 Posts 1,737 Credits 5,226 From 成都
  You have to remove the folder's "system + hidden + read-only" attributes first, and then del "C:\WINDOWS\Downloaded Program Files\*.*" /p won't give an error message.

  As for the "C:\Documents and Settings\Administrator" folder, since I haven't switched to it on my machine, I don't know whether removing attributes will work. I guess the path not found message is precisely because you haven't switched to the administrator user.
Floor6 zhaxi Posted 2006-07-02 16:03
初级用户 Posts 40 Credits 112
I'll give you the full statement that I collected. This is a ready-made bat file for clearing system junk files.

Floor7 namejm Posted 2006-07-02 16:30
荣誉版主 Posts 1,737 Credits 5,226 From 成都
  Hehe, is the one above the "Online Flying Fox System Junk Cleaner"?

  I've used his cleaner before, and during use it would give a prompt roughly saying that some files could not be cleared. Now after your post and thinking about it again, I guess it's because when using * to represent all files of a certain type, the author didn't take into account filenames with spaces, or perhaps some file is in use (this possibility is relatively small). Since the temporary files on my machine are rather important to me, I don't want to run the modified code for now. Please, the poster above, try putting quotes around the path in every statement.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023