linux – How to associate unix commands from vim, with all the files opened in a split window?

Lets say for example, I have 3 files opened in split windows in vim. And I have to changes the access permissions to each of them, then one way to do it, is to move my cursor to individual split window & execute :!chmod 777 %
The problem here is that I have to do execute this command ‘n’ number of times, for ‘n’ number of split windows opened. Is there an easier way, where this can be achieved by executing just single command from vim?