Create subdirectory under each directory containing a file
问题 I have a large number of photos that are contained in over 100 directories. These are all pre-installation photos. I would like to keep the existing directory structure but add a \pre and \post directory in any directory that contains a .jpg photo. I dont want a subdirectory created if a given directory only contains other directories but not files For testing , I have a single .jpg in c:\temp\one\two\three. I ran this command in c:\temp: FOR /R c:\temp %G IN (*.jpg) DO mkdir pre However, it