Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copy folder contents and change extensions

129 views
Skip to first unread message

Terry Pinnell

unread,
Oct 25, 2021, 5:08:00 AM10/25/21
to
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

Zaidy036

unread,
Oct 25, 2021, 10:39:31 AM10/25/21
to
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 <new path> MKDIR <new path>
COPY /Y <old path>\*.ino <new path>\*.txt
-or-
COPY /Y <old path>\*.ino <new path>
REN <new path>\*.ino *.txt

Terry Pinnell

unread,
Oct 26, 2021, 4:54:26 AM10/26/21
to
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

Zaidy036

unread,
Oct 26, 2021, 11:46:45 AM10/26/21
to
FORFILES does recursive using /S
0 new messages