Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Compact command in dos

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to use the Compact command in dos, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Compact

Displays and changes file or directory compression on the NTFS partition. If used with no parameters, compact displays the compressed state of the current directory.

Grammar

Compact [{/ c | / u}] [/ s [: dir]] [/ a] [/ I] [/ f] [/ Q] [FileName [...]]

Parameters.

/ c

Compresses the specified directory or file.

/ u

Extract the specified directory or file.

S:dir

Specifies that the requested operation (compressed or unzipped) is applied to all subdirectories of the specified directory or, if no directory is specified, to all subdirectories of the current directory.

/ a

Show hidden or system files.

/ i

Ignore the error.

/ f

Compresses or decompresses the specified directory or file. This is used when the file is partially compressed when the system crashes and interrupts the operation. To force the file to be fully compressed, use the / c and / f parameters and specify a partially compressed file.

/ q

Report only the most basic information.

FileName

Specify a file or directory. You can use multiple file names and wildcard characters (* and?).

/?

Displays help at the command prompt.

Annotation

The compact command is the command-line version of the comparison function in the NTFS file system. It displays and changes the compression properties of files and directories on the NTFS partition. The compression status of the directory indicates whether the files added to the directory are automatically compressed. When you set the compression state of a directory, you do not have to change the compression state of the files already in the directory.

Volumes that have been compressed by DriveSpace or DoubleSpace cannot be read, written, or assembled using compact.

Example

To set the compression state for the current folder and its subfolders and existing files, type under the current folder:

Compact / c / s

Does not change the compressed state of the current folder, but only sets the compressed state of files in the current folder, subfolders, and all subfolders. To do this, type under the current folder:

Compact / c / s *. *

"to compress a volume, type under the root folder of the volume:"

Compact / c / I / s:\

This example sets the compression state of the root folder and all folders on the volume, and compresses each file on the volume. Using the / I parameter, you can ensure that error messages do not interrupt the compression process.

To compress all files that end with .bmp in all subdirectories of the\ Tmp and\ Tmp directories without modifying the compression properties of those directories, type:

Compact / c / s:\ tmp * .bmp

To force full compression of the file Zebra.bmp that was partially compressed at the time of the system crash, type:

Compact / c / f zebra.bmp

To remove the compression attribute from the directory C:\ Tmp without changing the compression state of any files in that directory, type:

Compact / u c:\ tmp

Thank you for reading this article carefully. I hope the article "how to use Compact commands in dos" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report