You are not logged in.
Hi
I Have over a 1000 pictures in the format JPG which I have to sort. So far I have managed to sort them so I have a numerical order in the files that resets every 18th picture. Now I need to save every 18th picture to a new folder named numerical as in 1,2,3,4,5 and so on to a distination of my own choice. I found someone who asked a similar question but I didn't understand the answer to his problem which is close to mine. Please help. If I have 28 pictures then I need 18 of them to go into a folder named "1" and then remaining 10 pictures to go in a folder named "2".
Offline
Hi,
You can do this with a bit of Pascal Script magic (rule), using the following script:
const
MAX = 18;
var
Counter, Index: Integer;
begin
Inc(Index);
if Counter = 0 then
Counter := 1;
if Index >= MAX then
begin
Index := 0;
Counter := Counter + 1;
end;
FileName := IntToStr(Counter) + '\' + FileName;
end.
This will prefix each filename with a numbered folder, which is incremented every MAX number of files (as defined in the script).
Here is an example of old and new names if MAX=5:
1.txt 1\1.txt
2.txt 1\2.txt
3.txt 1\3.txt
4.txt 1\4.txt
5.txt 1\5.txt
6.txt 2\6.txt
7.txt 2\7.txt
8.txt 2\8.txt
9.txt 2\9.txt
10.txt 2\10.txt
11.txt 3\11.txt
12.txt 3\12.txt
Offline
Thank you so much. It works . This just made my life so much easier
.
Offline