求助:关于改文件名
% --- Executes on button press in pushbutton9.function pushbutton9_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton9 (see GCBO)
% eventdatareserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global gfile;
=uigetfile({'*.ts2;*.ts3;*.ts4;*.ts5';'*.ts2';'*.ts3';'*.ts4';'*.ts5'}, 'MultiSelect','on');
pathfile3=strcat(pathname3,filename3);
handles.pathfile3=pathfile3;
handles.filterindex3=filterindex3;
guidata(hObject, handles);
if iscell(handles.pathfile3)
=size(handles.pathfile3);
for na=1:n
gfile=;
end
else
gfile=;
end
assignin('base','gf',gfile);
prompt={'想加字符:'};
def={'a'};
dlgTitle='输入 字符';
lineNo=1;
zf=inputdlg(prompt,dlgTitle,lineNo,def);
assignin('base','zfs',zf);
=size(gfile);
for m2=1:m1
=size(gfile{m2});
newname = ;
status = system(['rename'' ' gfile{m2}' ' newname]);
end
设计了一个按钮,现在选中的文件名后加一个a,比如:文件名为w.txt,变为wa.txt
前面都没错,就最后for循环里的改文件名的system有错,但不知道怎么改,请高手帮帮忙吧!!!
页:
[1]