FYI:
https://www.computerhope.com/compact.htm
I would not run the compact command from the root drive. Target specific folders and subfolders below that level.
You used a single * as a wild card. Not sure if that is acceptable syntax. Again I would target the files specifically by full file name or at least by the applicable extension: e.g., *.txt
Try/test with small files first and work upwards towards more and larger files. Do not "go global" unless and until you are very sure that the end results will be as desired.
Also: Be very certain that you have the applicable files backed up somewhere else beyond the current host computer's reach. All to easy for compressions etc. to go astray and using a global approach may have unintended consequences.
Verify that the backups are recoverable and readable.