So there's definitely a difference but it's something we may be able to live with. Thank you. I fully agree that Compact is not the answer. There are additional concerns with the Compact command.
It enables disk compression which is a total no-no. Very bad! It makes your computer very slow and is quite difficult to undo. The only time anyone should use this command is when they're removing disk compression because someone turned it on to save space. Turning this off has to be done by booting into the recovery console, if my memory serves me correctly, and it's a real nuisance.
So definitely no to the Compact command. If you wanted to compress files before sending them to another drive, or over a network, or by email, then Compact wouldn't actually help at all because the files have to get uncompressed whenever they're accessed, especially before sending them anywhere. When I say accessed, I mean that just looking at a file triggers the OS to decompress it in the background and present you with an uncompressed version of it then letting you change it and recompressing it again for storage every single time you access the file, which is why your machine gets slower.
If you have folders or files that have blue text instead of black, then you've probably already made this mistake. If anyone knows if MS provides such a feature, either by command-line or through an API, then I'd love to hear about it. Good luck to those of you that have disk compression turn on. I know this is old but I was looking for a way to do this for a bat script and was able to without any third-party installs.
This works by creating a compressed zip file. Does anyone see any issues with using this to create the ZIP files in a batch job? Anyway, worked for me in a batch script. I wasn't too concerned about the level of compression, if any. You will notice the content of your txt file.
Effectively all that happened was you created a copy of the original file period. The best way I know to accomplish what you're trying to do is by using a PowerShell script. You would access the System. Compression namespace. Can be done from a normal command line you just call powershell. Not only this answer is not the correct answer, it has nothing to do what the original poster is asking!
Original question is asking about compressing to zip file, not doing NTFS compression of files and folders. Office Office Exchange Server. Not an IT pro? Windows Client. Can you suggest me in windows XP? This will not be platform independent. I think OP wants to do it using java. The zip Package should be installed in system. ELinuxbook ELinuxbook 95 2 2 bronze badges. I assume that works on Linux, but it doesn't work on Windows.
Of course, the OP didn't mention which operating system he was using. Michal Sipek Michal Sipek 6 6 silver badges 17 17 bronze badges.
The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.
Compact : compress files from command line CMD by Srini. Check the compression status of a file: compact filename Example:. Reply Link. Can we compress into. ZIP file in cmd without using powershell or vbscripts? Where is my Compact file? I am not able to find it on my drive.
0コメント