Let your images lie in /pathtoimages/unchanged/.
Create the folder /pathtoimages/changed/
SetDirectory["/pathtoimages/unchanged/"];
names = FileBaseName /@ FileNames["*.png"];
I'm using the extension png in my example, as I have a bunch of png images somewhere on my machine. If you have photos, they're most likely with the extension jpg - adjust accordingly.
Do[im = Import[name <> ".png"];
Export["../changed/" <> name <> "_blackwhite.png", Binarize[im]];
Export["../changed/" <> name <> "_grayscale.png", ColorConvert[im, "Grayscale"]];
, {name, names}]
It's quite slow - took about 30 seconds for 11 files with a total size of 3MB
Answer from LLlAMnYP on Stack ExchangeImport[FileNameJoin[{"Path", "To", "Directory", "*.jpeg"}], "JPEG"] is undocumented but will work (for now, subject to change).
I recommend perhaps FileSystemMap for this task. Simply Import[#, "JPEG"] & /@ FileNames["/Path/To/Directory/*.jpeg"] will work just fine as well.
afaik. there is no easier way than doing
images = {}
names = FileNames[pattern,{directory}]
Do[AppendTo[images = Import[fileName]], {fileName, names}]
with
pattern = "*.png"
directory = "YourDirectoryName"
The code is untested but should work. Sadly i cannot easily test the code lacking such directory.
code from my old question (modified): DumpSave'ing while lengthy program runs
Make your filenames unambiguously parsable, e.g. by consistently using some delimeters like underscores or something. A typical file name can look like "Electric_B_3.png". EDIT If you have no control over the file names, use string patterns as described by other answers, but in the long-term you may benefit from creating your own robust naming scheme END EDIT
Then write a function that would parse a single file name, something like:
fileNameParse[fname_String, delim_String: "_"] :=
StringSplit[FileBaseName[fname], delim]
Then, Map it on FileNames["*.png", {your-dir}].
Finally, apply your importOne on the level one:
importOne@@@Map[fileNameParse, FileNames["*.png", {your-dir}]]
Since you have the result of Map available as well, you can regroup them any way you want. You can, for example, Map a function {#, importOne@@#}&, rather than just using importOne@@@.... Then, you could use GatherBy or any other means to regroup and collect your images according to the parts of their filenames.
EDIT
Here is a self-contained example ( I use text files, but this doesn't matter):
ClearAll[fileNameParse, fileNameMake, importOne, $dir];
fileNameParse[fname_String, delim_String: "_"] :=
StringSplit[FileBaseName[fname], delim];
fileNameMake[pieces_List, delim_String: "_", ext_String: ".txt"] :=
StringJoin[Append[Riffle[pieces, "_"], ".txt"]];
importOne[set_, cat_, num_, dir_: $dir] :=
Import[FileNameJoin[{dir, fileNameMake[{set, cat, num}]}]];
We now create a temporary directory:
$dir = FileNameJoin[{$TemporaryDirectory, "ImportTest"}];
If[! FileExistsQ[$dir], CreateDirectory[$dir]];
Create sample files:
MapIndexed[
Export[#, "Test" <> ToString[#2], "Text"] &,
Flatten[
Outer[
FileNameJoin[{$dir, fileNameMake[{##}]}] &,
{"Electric"}, {"A", "B", "C"}, {"1", "2", "3"}
]]];
import them:
imported = Map[{#, importOne @@ #} &, fileNameParse /@ FileNames["*.txt", {$dir}]]
(*
==>
{{{"Electric", "A", "1"}, "Test{1}"}, {{"Electric", "A", "2"}, "Test{2}"},
{{"Electric", "A", "3"}, "Test{3}"}, {{"Electric", "B", "1"}, "Test{4}"},
{{"Electric", "B", "2"}, "Test{5}"}, {{"Electric", "B", "3"}, "Test{6}"},
{{"Electric", "C", "1"}, "Test{7}"}, {{"Electric", "C", "2"}, "Test{8}"},
{{"Electric", "C", "3"}, "Test{9}"}
}
*)
You can now, for example, group them according to whatever parts of their file names you wish:
GatherBy[imported , #[[1, 2]] &][[1]]
(*
==>
{{{"Electric", "A", "1"}, "Test{1}"}, {{"Electric", "A", "2"}, "Test{2}"},
{{"Electric", "A", "3"}, "Test{3}"}}
*)
Here is one approach. First set your working directory with SetDirectory, then:
names = FileNames["*.png"];
groups = GatherBy[names, StringTake[#, {-6}] &];
Evaluate[
electric[StringTake[#, {-6}]] & /@ groups[[All, 1]]
] = Map[Import[#] ~ImageResize~ 128 &, groups, {2}];
Now access image lists like:
electric["B"]
This relies on manually picking a string position to index by, here {-6}. Leonid's method would be more robust for future naming.
As Simon already pointed out, don't use a raster-format for a vector-graphics. Instead, export you plot to e.g. a scalable vector graphics:
graph = GraphPlot[ExampleData[{"Matrix", "HB/can_292"}, "Matrix"]];
Export["graph.svg", graph]
The advantage is, that in such an image, you can still adjust and change lines, polygons and colors. And finally, you can export it to an image of arbitrary quality easily.

And remember, for Plots which contain lines, polygons, ... everything with sharp edges you should never use jpg. General speaking, this is a format for photographs only since its compression is made for reducing filesize in natural images. In those images you don't recognize the compression, in images with text, lines and polygons you certainly will notice the artefacts. Use png if possible. Take your browser and zoom into the above image.
You can set both image size and compression level of the exported file by doing something like
Export[file_name, G, ImageSize -> 1200, "CompressionLevel" -> 0]