Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 68,073 of 68,980    |
|    =?UTF-8?B?SsO8cmkgVGFzdWph?= to Herbert Kleebauer    |
|    Re: move a fixed number of files between    |
|    05 Jul 23 04:50:48    |
   
   From: tarbija6@gmail.com   
      
   On Wednesday, 5 July 2023 at 14:05:33 UTC+3, Herbert Kleebauer wrote:   
   > On 04.07.2023 15:57, Jüri Tasuja wrote:    
   >    
   >    
   > > What I try to do is to move (sort) sets of images (3 images in each set)    
   > > to 2 different folder.   
   > Without giving any information how the 3 files of a set can be found,    
   > nobody can help. Do they have the same name but a different extension?    
   > Or is there a common prefix in the file name? Or is there only one    
   > set in the source directory?   
   > > Condition for moving is difference in file sizes %%z1 within these    
   > > 3 image sets. If image sizes differs less than e.g. 2 kB among any    
   > > of these 3 images then the set goes to one folder if else then to    
   > > other folder. Is anyone who could help on this? Many thanks!   
      
   So far I modified one of the script that moves images from one folder to   
   other. Counter of the script works well with images but it sends them away one   
   by one before it is possible to compare these.   
      
   @echo off   
   set SourceDir=E:\   
   set TargetDir=E:\new\   
   set MaxFiles=3   
   set m=0   
      
   for /f %%i in ('dir /b /a-d "%SourceDir%\*.*"') do call :sub %%i   
   goto :eof   
      
   :sub   
   if not %m%==0 goto :s1   
   set m=%MaxFiles%   
      
   :s1   
   move %SourceDir%\%1 %TargetDir%\ >nul   
   set /a m=m-1   
   goto :eof   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca