changing the name of the csv files but getting errors
古いコメントを表示
Hi, I am basically using command below to change the name of the bunch of the files!
movefile('oldname.csv','newname.csv')
I tried on one file as shown below and it works
%movefile('vel.0.csv','vel0.csv')......basically I am using one of the post processing software which is exporting files in decimals and matlab is giving me an error while reading the files.... so I want to change the name or remove the points. I tried to loop it but I am getting an error as you can see below I have files from vel.0.csv to vel.201.csv all i want to remove an extra decimal point from them so ti should be like vel0.csv t0 vel201.csv
Code tried so far:
% Get all files in the current folder clear all;
files = dir(fullfile('C:','Users','muhammad','Desktop','Velocity','*.csv'));
% Loop through each
for ii = 1:length(files)
movefile(vel.(ii).csv, vel(ii).csv'));
end
Error:
Error: File: renameFiles.m Line: 9 Column: 47
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for
mismatched delimiters.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!