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,807 of 68,980   
   Terry Pinnell to Zaidy036@air.isp.spam   
   Re: Copy folder contents and change exte   
   26 Oct 21 09:54:24   
   
   From: me@somewhere.invalid   
      
   Zaidy036  wrote:   
      
   >On 10/25/2021 5:07 AM, Terry Pinnell wrote:   
   >> On this Win 10 PC I can use my backup application (SecondCopy) to copy a   
   folder   
   >> and its entire contents. But all the source files have the extension '.ino'   
   and   
   >> I want that changed to '.txt' for the copies, which SecondCopy cannot   
   achieve.   
   >> (That will allow me to view them on my iPad with Dropbox, which cannot do so   
   >> despite their being plain text files.)   
   >>   
   >> Is it possible with a batch file please and if so I'd greatly appreciate a   
   >> suggested file I can try please?   
   >>   
   >> Terry   
   >>   
   >   
   >I believe you can make a new folder if it does not exist already and   
   >then use COPY and change the name at the same time. If there is a   
   >problem do the copy without a name change and use RENAME.   
   >   
   >IF NOT EXIST  MKDIR    
   >COPY /Y \*.ino \*.txt   
   >-or-   
   >COPY /Y \*.ino    
   >REN \*.ino *.txt   
      
   Thanks, I'll try that shortly. But are you fairly sure it will act recursively   
   on the files in all subfolders?   
      
   I also looked at using the command prompt RENAME (after the successful copy),   
   but cannot get my head around making it work on all subfolders.   
      
   Terry   
      
   --- 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