[previous code that do not matters here...
strlist6=strcat(strModelFolder,'\',str2,'\Trial');
Infolder = dir(strlist6);
MyListOfFiles = {Infolder(~[Infolder.isdir]).name};
set(handles.listbox6,'String', MyListOfFiles);
function listbox6_Callback(hObject, eventdata, handles)
contents = cellstr(get(hObject,'String'));
List6=contents{get(hObject,'Value')};
function listbox6_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function pushbutton3_CreateFcn(hObject, eventdata, handles)
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function pushbutton3_Callback(hObject, eventdata, handles)
a = get(handles.listbox6,'string');
temp = char(a);
b = get(handles.listbox6,'Value');
choice1 = a(b);
c = get(handles.listbox6,'Value');
set(handles.listbox7,'string',choice1)
function pushbutton4_CreateFcn(hObject, eventdata, handles)
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function pushbutton4_Callback(hObject, eventdata, handles)
a = get(handles.listbox7,'string');
c= get(handles.listbox7,'Value');
choice = a(c);
choice(c,:) = [];
set(handles.listbox7,'string',choice)