Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Windows 7中将横向图像从一个文件夹复制到另一个文件夹_Windows_Batch File_Cmd - Fatal编程技术网

在Windows 7中将横向图像从一个文件夹复制到另一个文件夹

在Windows 7中将横向图像从一个文件夹复制到另一个文件夹,windows,batch-file,cmd,Windows,Batch File,Cmd,在Windows 7中,我只想将横向图像从一个文件夹复制到另一个文件夹。我正在寻找一种脚本化的方法来实现这一点,因为我有很多包含数百个图像的文件夹。我在批处理方面是新手,事实上,这个项目就是我在批处理方面是新手的原因。powershell“添加type-A System.Drawing;gci-r-I*.png,*.jpg |%{$I=new object Drawing.bitmap$\ FullName;if($I.Width-gt$I.Height-and!$I.Dispose()){cp

在Windows 7中,我只想将横向图像从一个文件夹复制到另一个文件夹。我正在寻找一种脚本化的方法来实现这一点,因为我有很多包含数百个图像的文件夹。我在批处理方面是新手,事实上,这个项目就是我在批处理方面是新手的原因。

powershell“添加type-A System.Drawing;gci-r-I*.png,*.jpg |%{$I=new object Drawing.bitmap$\ FullName;if($I.Width-gt$I.Height-and!$I.Dispose()){cp$'c:\path\to\destination'}”
将递归复制宽度大于高度的所有PNG和JPG文件。如果您想学习批处理或powershell脚本,您应该在将来使您的问题更加具体。另外,MS-DOS已经不再是一个真正的东西了,除非你真的在为Windows3.1编写它。“批处理文件”标签就足够了。谢谢你的工作,我为这个问题道歉。