Organize old files

This commit is contained in:
2024-07-29 18:12:57 -04:00
parent d2a5d9e69f
commit 39672a6ca0
98 changed files with 57004 additions and 19259 deletions

View File

@@ -0,0 +1,22 @@
%tif2jpeg converter
[Scanfiles, pathname]=uigetfile('*', 'Select a Folder File');
path=pathname;
dirLst=dir(path);
for i=1:size(dirLst,1)
if ~isempty(str2num(dirLst(i).name))
selDir=fullfile(path,dirLst(i).name);
filelst=dir(selDir);
for n=1:size(filelst,1)
try
if ~isempty(strfind(filelst(n).name,'bmp'))
inFile=filelst(n).name;
a=imread(fullfile(selDir,inFile)); %(inFile{1});
outFile= strrep(inFile,'.bmp','.jpg');
imwrite(a,fullfile(selDir,outFile), 'quality',95)
end
catch
end
end
end %if ~isempty(str2num(dirLst(i).name))
end %for all numeric folders