Compress concrete files on different folders

50 views Asked by At

We work with a lot of Microsoft Access files for different costumers. That files are saved in different folders(also in subfolders) for every year separated by year,costumer ,month, etc.

The main thing here is that I want to compress all the access files because they weight a lot and they're consuming our DFS space...

I tried with 7za but I can't figure out how to compress each file on each folder containing that file. The script that I've done compress all the access files in one packet, in one concrete folder... That's no a solution.

What I tried:

7za.exe a -r -t7z accessfiles.7z *.accdb

Is there any way to do what I want?

(sorry for my english, I'm trying to do my best!)

1

There are 1 answers

1
MC ND On BEST ANSWER
for /r "c:\somewhere" %a in (*.accdb) do 7za a "%%~dpaaccessfiles.7z" "%%~fa"

This should create a separate 7z file in each folder containing a .accdb file