Am I correct that you're hoping to have the variable that stores the file name be file1 at the second iteration, file2 at the third, etc.? If so, while you can dynamically create variables with numbered names like x1, x2, x3, etc. the general consensus is that you should not. That Answers post explains why this is generally discouraged and offers several alternative approaches.
In this case I'd probably use a string array or perhaps a cell array. If I knew I wanted to retrieve a specific number of files (7 in this case) I'd preallocate. I'm using hard-coded strings instead of uigetfile so I can run this in Answers and show you the technique.
listOfDwarfs = strings(7, 1)
F = "Bashful.txt";
% Do something with F
listOfDwarfs(1) = F
F = "Doc.txt";
% Do something with this F
listOfDwarfs(2) = F
F = "Dopey.txt";
% Do something with this F
listOfDwarfs(3) = F
% Continue with Grumpy.txt, Happy.txt, Sleepy.txt, and Sneezy.txt
