Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Someone at my job (a sysadmin) actually performed a "cleanup" task on WinXP which at the same time compressed all the files on my HDD with the Windows compressed file attribute (Filenames get blue in Windows Explorer)

I don't actually need my files to be compressed, and I think it can also affect the performance of my PC.

I tried searching for files, selecting them with Windows explorer and deselecting the checkbox to uncompress them, but just getting the "Properties" window for 160,000 files is impossible.

Someone have an idea about this ? A .bat file to do the job ?

share|improve this question
You should discuss this with your sysadmin, rather than try to bypass him/her. – John Gardeniers Feb 24 '10 at 22:20
That was done by mistake by a sysadmin that does not work here anymore ;-) Other sysadmins did not know how to revert this, that's why I'm asking here. – MaxiWheat Feb 25 '10 at 1:25

1 Answer 1

up vote 3 down vote accepted

The compact /u command will do it. The PITA will be running it against all files, and you might want to preserve certain files compressed attributes, like c:\windows\$ntuninstall* . If you're not worried about the latter, just run compact /u /s c: and let it grind away and hope you don't run out of disk space.

If you have Cygwin installed, you could build a find | xargs compact /u with enough -name attributes to not uncompress directories that you want to keep compressed. You could also probably do the same thing with PS or (heavens) VBscript. A .BAT or FOR command is probably just asking for trouble.

It might also be best to let the IT guys do their job, or at least bring your concerns to them. It's not impossible to have a misinformed and/or junior IT guy do some unhelpful tinkering, do you have any IT guys that you trust at work?

share|improve this answer
Works great thank you :-) I just needed to alter a bit your suggested query to : compact /u /s /i d:* /i ignores errors (I got one a certain point for system volume folder) d:* (I added * to include all files) – MaxiWheat Feb 25 '10 at 1:42
You can iterate over files and directories with the for command. No need for find or xargs there. You can check in the for loop whether it's a directory (proven to be more robust than iterating over the output of dir which has severe problems when facing Unicode names with Raster fonts enabled for the console window). – Joey Feb 25 '10 at 11:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.