renaming files as a batch

6 views
Skip to first unread message

Emily Harrington

unread,
May 20, 2025, 2:04:28 PMMay 20
to chibolts
Hello,

I am trying to rename CHAT files to have consistent file names. However, I am struggling to get the ren command to do this. 

Here are examples of the file names:
Play_T33_CCX_1002_cc.sltin.cha
Play_T33_CCX_1011_video_z.sltin.cha
PLAY_T33_CCX_1062_video_z.cha

Ideally, I'd like all files to be named Play_T33_CCX_#### where the #### is the unique identifier for that participant. This would remove the extra information after the unique identifier which differs across the file names. 

Is there a way to do this as a batch? 

Thank you,

Emily Harrington, PhD, CCC-SLP
University of Illinois Urbana-Champaign 

Leonid Spektor

unread,
May 20, 2025, 3:12:40 PMMay 20
to chib...@googlegroups.com
Hi Emily,

Please try commands below and see which one works best for you. Make sure to backup files in case rename command does something wrong.

ren Play_T33_CCX_*_*.cha Play_T33_CCX_*.cha

ren *X_*_*.cha *X_*.cha

ren *_*_*_*_*.cha *_*_*_*.cha


Leonid.

--
You received this message because you are subscribed to the Google Groups "chibolts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chibolts+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/chibolts/dc147b9b-35f6-4b83-82b9-748890f07f6cn%40googlegroups.com.

Emily Harrington

unread,
May 21, 2025, 11:44:07 AMMay 21
to chib...@googlegroups.com
Hi Leonid,

The first command worked well.

Thank you! 

Emily 

You received this message because you are subscribed to a topic in the Google Groups "chibolts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chibolts/849ne54ZjF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chibolts+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/chibolts/9F0AC7A1-E264-42F4-A50E-655B26B5275A%40andrew.cmu.edu.
Reply all
Reply to author
Forward
0 new messages