home bbs files messages ]

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,069 of 68,980   
   =?UTF-8?B?SsO8cmkgVGFzdWph?= to Herbert Kleebauer   
   Re: move a fixed number of files between   
   04 Jul 23 06:57:38   
   
   From: tarbija6@gmail.com   
      
   On Saturday, 6 May 2017 at 01:31:01 UTC+3, Herbert Kleebauer wrote:   
   > On 05.05.2017 17:09, hvd...@gmail.com wrote:    
   >    
   > > Eg: I have a folder A contains 100.000 files. I want to have a    
   > > code that click one time move 5000 files from A to folder 1, 2, ..., 19,   
   20.   
   > @echo off    
   > set SourceDir=C:\dir1    
   > set TargetDir=C:\dir2    
   > set MaxFiles=100   
   > set m=0    
   > set n=0    
   >    
   > for /f %%i in ('dir /b /a-d "%SourceDir%\*.*"') do call :sub %%i    
   > goto :eof    
   >    
   > :sub    
   > if not %m%==0 goto :s1    
   > set /a n=n+1    
   > mkdir %TargetDir%\%n%    
   > set m=%MaxFiles%    
   >    
   > :s1    
   > move %SourceDir%\%1 %TargetDir%\%n%\ >nul    
   > set /a m=m-1    
   > goto :eof   
      
   Hi,   
   I tried to modify this script by deleting all n parts so it won't produce all   
   these folders but still moves files in sets. But it seems like it's not so   
   straight forward as I thought.   
   What I try to do is to move (sort) sets of images (3 images in each set) to 2   
   different folder.   
   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!   
      
   --- 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