I have multiple pictures I would like to import all at once. The filenames range from "000001.tif" to "000200.tif." I am having a hard time importing multiple images after looking up the filenames and modifying which ranges I would like to import.
So far I've done the following:
names=FileBaseName /@ FileNames["*.tif"];
Flatten@ToExpression@StringSplit[names, ","];
Select[%, 20 <= # <= 22 &]
{"20", "21", "22"}
n = ToString /@ HoldForm /@ Unevaluated@%;
nn = StringTemplate["0000``"] /@ n
{"000020", "000021", "000022"}
From here when I try to import these files, mathematica merges them into one text.
Import[nn <> ".tif"]
Import::nffil: File 000020000021000022.tif not found during Import.
How can I import from a string and grab multiple files? And when I try to change the string {"000020", "000021", "000022"} to a list, I always loose the 0s.
Any help is very appreciated, thanks
Import[#<>".tif"]&/@nn
$\endgroup$