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 67,831 of 68,980   
   LangerTom to All   
   Re: Problem with file copying in Batch   
   07 Nov 21 20:56:56   
   
   From: hobby.tl@langer-online.net.invalid   
      
   Am 04.11.2021 um 23:30 schrieb John Stockton:   
   > In this code, the echo lines are merely for debugging   
   >   
   > @echo FOR /F "eol=; tokens=*" %%J IN (ZZZ\ZZZZ.TXT) DO (   
   >        FOR /F "eol=; tokens=*" %%J IN (ZZZ\ZZZZ.TXT) DO (   
   > @echo TRYING :	Xcopy /F %%J ZZZ\%%J   
   > 		Xcopy /F %%J ZZZ\%%J   
   > @echo.   
   >   )   
   >   
   > That works, except that every time Xcopy is called, I get, on-screen,   
   >   
   > "Does C:\MYSLIDES\ZZZ\33-xxxiii\11.jpg specify a file name   
   > or directory name on the target   
   > (F = file, D = directory)?"   
   >   
   > An answer of F works, but I don't want to be asked; there may be over 100   
   calls.  I've tried XCOPY /?, but cannot recognise a suitable option.   
   >   
   > What should I do?   
   >   
      
      
   If I remember correctly you should add a trailing back slash to the   
   target. This tells xcopy to copy files to a target directory.   
      
   xcopy /f %%J ZZZ\%%J\   
      
   (not tested)   
      
   Thomas   
      
   --- 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