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,077 of 68,980   
   Herbert Kleebauer to All   
   Re: move a fixed number of files between   
   06 Jul 23 18:59:37   
   
   From: klee@unibwm.de   
      
   On 06.07.2023 12:59, Jüri Tasuja wrote:   
      
    >> set SourceDir=E:\   
    >> set TargetDir1=E:\new1\   
    >> set TargetDir2=E:\new2\   
    >>   
    >> set n=0   
    >> for /f %%i in ('dir /b /on "%SourceDir%*.jpg"') do call :sub %%i   
    >> goto :eof   
      
    > Many thanks for script! Unfortunately I can't get it working.   
    > I have tested it and the script itself is working just perfectly   
    > but it fails when moving files where it gives message "Access denied".   
      
   "Move" can only be used when source and destination are on the   
   same drive. To avoid problems with different drive letters   
   assigned to the external drive, I would do it manually:   
      
   After connecting the external drive, use Windows Explorer to   
   copy all the jpgs to a local folder, for example to d:\my_jpgs   
   and use:   
      
   set SourceDir=d:\my_jpgs\   
   set TargetDir1=d:\my_jpgs\new1\   
   set TargetDir2=d:\my_jpgs\new2\   
      
   in your batch file (don't forget to create the two target   
   directories or create them in the batch if they don't exists).   
      
   If all is ok, use Explorer to delete the jpgs on the external   
   drive and to unmount the drive.   
      
   --- 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