Matlab: automated ommitting of letters from mutiple file names

AI Thread Summary
A new Matlab user seeks assistance in automating the removal of the "daily" portion from approximately 200 dataset filenames formatted as "varname_sample_daily." The user prefers a script to avoid the tedious manual renaming process. Suggestions include utilizing Matlab functions such as dir, movefile, substring, and strfind to facilitate this task. The discussion emphasizes the need for an efficient solution for batch renaming files in Matlab. Overall, the focus is on finding a script-based approach to streamline the filename modification process.
chowjonathan
Messages
1
Reaction score
0
Forgive me if this sounds really stupid. I am a new Matlab user, and I have about 200 data sets from various samples in the naming format "varname_sample_daily" and i wish to remove the "daily" portion of it from the variable name through an automated process (i.e change all file names to just "varname_sample").

I am not sure if there's a script that could help me with this rather than having to change them all manually (which I really dread). Would greatly appreciate if anyone can offer some help with this. Thanks!
 
Physics news on Phys.org
is this homework for some class??
regardless take a look at the following Matlab functions
dir
movefile
substring
strfind
 

Similar threads

Back
Top