用什么命令清空回收站
要可以在命令提示符(或“运行”)窗口中执行
给一个小程序也行
PS: 这个问题我上网找了好久也没找到,问题还是有一点难度的
答案或建议:
非常简单!
这是体统自带的完整清除垃圾文件的命令:
cleanmgr /sageset:99 : 設定特別模式「清理磁碟」工具行.
cleanmgr /SAGERUN:99 : 清除
------------------------------------
补充:来点复杂的:
CLEANMGR.exe
Automated cleanup of Temp files, Internet files, downloaded files, recycle bin (XP).
Syntax
CLEANMGR option
Options
/d driveletter: - Select the drive that you want Disk Cleanup to clean.
/sageset:n - Display the Disk Cleanup Settings dialog box and create
a registry key to store the settings you select.
The n value is stored in the registry and allows you to
specify different tasks for Disk Cleanup to run.
n can be any integer from 0 to 65535.
Specify the %systemroot% drive to see all the available options.
/sagerun:n - Run task 'n'
All drives in the computer will be enumerated, and the
selected profile will be run against each drive.
Only one of the 3 options above can be run at a time
Examples
CLEANMGR /sageset:64
CLEANMGR /sagerun:64
Options that can be chosen for cleanup:
Temporary Internet Files
Temporary Setup Files
Downloaded Program Files
Old Chkdsk Files
Recycle Bin
Temporary Files
Temporary Offline Files
Offline Files
Compress Old Files
Catalog Files for the Content Indexer
Items in bold may appear in more than one drive i.e not just in %SystemRoot%
If you want to choose the options automatically, without any user interaction then run a registry script like this
e.g.
REGEDIT /S cleanmgr.reg
CLEANMGR /sagerun:64
Other items you may want to clear out...
Application Data
Most files in Application Data are things like browser bookmark files - best left alone.
However some applications (e.g. MS Access) leave large files in application data which you probably don't need in a roaming profile, these can be selectively deleted with a batch script like this.
Recent files
To clear the shortcuts for Start, Documents
cd %userprofile%\Recent
echo y| del *.*
Notice that the 'Recent' folder may contain many more shortcuts than are set to display under Start, Documents.
Locked files (Typically IE temp files or the Offline cache)
This works on any version of NT, 2000 or XP
Close all applications
Open a command prompt
Click Start, and then Shut Down
Simultaneously press CTRL+SHIFT+ALT.
While you keep these keys pressed, click Cancel in the Shut Down Windows dialog box.
In the command prompt window, navigate to the cache location, and delete all files from the folder (DEL /s)
At the command prompt, type explorer, and then press ENTER.
"Then will I sprinkle clean water upon you, and ye shall be clean: from all your filthiness, and from all your idols, will I cleanse you." - Ezekiel 36:25
Related commands:
DELPROF - Delete NT user profiles and/or User Profile cache
DEFRAG - Defragment hard drive (XP)
Q253597 - Automating Disk Cleanup in Windows
Q315246 - Automating Disk Cleanup in Windows XP
Q812248 - Disk Cleanup stops responding while compressing old files
Equivalent Linux BASH commands:
watch - Execute/display a program periodically
这是体统自带的完整清除垃圾文件的命令:
cleanmgr /sageset:99 : 設定特別模式「清理磁碟」工具行.
cleanmgr /SAGERUN:99 : 清除
------------------------------------
补充:来点复杂的:
CLEANMGR.exe
Automated cleanup of Temp files, Internet files, downloaded files, recycle bin (XP).
Syntax
CLEANMGR option
Options
/d driveletter: - Select the drive that you want Disk Cleanup to clean.
/sageset:n - Display the Disk Cleanup Settings dialog box and create
a registry key to store the settings you select.
The n value is stored in the registry and allows you to
specify different tasks for Disk Cleanup to run.
n can be any integer from 0 to 65535.
Specify the %systemroot% drive to see all the available options.
/sagerun:n - Run task 'n'
All drives in the computer will be enumerated, and the
selected profile will be run against each drive.
Only one of the 3 options above can be run at a time
Examples
CLEANMGR /sageset:64
CLEANMGR /sagerun:64
Options that can be chosen for cleanup:
Temporary Internet Files
Temporary Setup Files
Downloaded Program Files
Old Chkdsk Files
Recycle Bin
Temporary Files
Temporary Offline Files
Offline Files
Compress Old Files
Catalog Files for the Content Indexer
Items in bold may appear in more than one drive i.e not just in %SystemRoot%
If you want to choose the options automatically, without any user interaction then run a registry script like this
e.g.
REGEDIT /S cleanmgr.reg
CLEANMGR /sagerun:64
Other items you may want to clear out...
Application Data
Most files in Application Data are things like browser bookmark files - best left alone.
However some applications (e.g. MS Access) leave large files in application data which you probably don't need in a roaming profile, these can be selectively deleted with a batch script like this.
Recent files
To clear the shortcuts for Start, Documents
cd %userprofile%\Recent
echo y| del *.*
Notice that the 'Recent' folder may contain many more shortcuts than are set to display under Start, Documents.
Locked files (Typically IE temp files or the Offline cache)
This works on any version of NT, 2000 or XP
Close all applications
Open a command prompt
Click Start, and then Shut Down
Simultaneously press CTRL+SHIFT+ALT.
While you keep these keys pressed, click Cancel in the Shut Down Windows dialog box.
In the command prompt window, navigate to the cache location, and delete all files from the folder (DEL /s)
At the command prompt, type explorer, and then press ENTER.
"Then will I sprinkle clean water upon you, and ye shall be clean: from all your filthiness, and from all your idols, will I cleanse you." - Ezekiel 36:25
Related commands:
DELPROF - Delete NT user profiles and/or User Profile cache
DEFRAG - Defragment hard drive (XP)
Q253597 - Automating Disk Cleanup in Windows
Q315246 - Automating Disk Cleanup in Windows XP
Q812248 - Disk Cleanup stops responding while compressing old files
Equivalent Linux BASH commands:
watch - Execute/display a program periodically
文章来自:http://www.baikewenda.com/tech/os/7/1/a12855222.htm
其它内容推荐:
推荐内容
·一次开机SVCHOST占用99%的解决过程
·如何改变WindowsXP程序默认安装路径?
·vista下播放视频如何不会关闭Windows Aero
·ADSL开机自动拨号
·windows7下如何设置文件夹别名
·为什么我的网络受限啊
·电脑总是提示“您可能是软件盗版的受害者”
·Win7桌面上的程序快捷方式全都打不开了,怎么办?
·常用的命令行命令有那些?
·windows vista如何找回透明玻璃效果
·不能将音量图标放入任务栏怎么办?
·可不可以强行打开ReadyBoost?我新买的优盘不支持
·Windows系统中如何改变输入法顺序
·Win7能不能去掉100M的启动分区?
·Windows各种系统文件无法打开故障解决方法
·怎么添上桌面的“我的电脑”?
·Windows自带局域网断点续传功能的问题
·无光驱如何重装64位win7系统
·怎么才能在自己的电脑上打繁体字呢?
·win7 Remote Desktop Connection不能上win2008?
·如何改变WindowsXP程序默认安装路径?
·vista下播放视频如何不会关闭Windows Aero
·ADSL开机自动拨号
·windows7下如何设置文件夹别名
·为什么我的网络受限啊
·电脑总是提示“您可能是软件盗版的受害者”
·Win7桌面上的程序快捷方式全都打不开了,怎么办?
·常用的命令行命令有那些?
·windows vista如何找回透明玻璃效果
·不能将音量图标放入任务栏怎么办?
·可不可以强行打开ReadyBoost?我新买的优盘不支持
·Windows系统中如何改变输入法顺序
·Win7能不能去掉100M的启动分区?
·Windows各种系统文件无法打开故障解决方法
·怎么添上桌面的“我的电脑”?
·Windows自带局域网断点续传功能的问题
·无光驱如何重装64位win7系统
·怎么才能在自己的电脑上打繁体字呢?
·win7 Remote Desktop Connection不能上win2008?