FOR %i IN (*.*) DO 7z.exe a "%~ni.7z" "%i"
Does the job for each selected file.
However I've got tons of directories (with files inside them obviously) I need to pack.
Say I have d:\dir1, d:\dir2, d:\dir3, d:\dir4. I need 7zip to pack them this way:
e:\dir1.7z, e:\dir2.7z, e:\dir3.7z, e:\dir4.7z.
How do I do that in 7zip command line?