Changeset 17 for trunk/src/update_imadoc.m
- Timestamp:
- Feb 18, 2010, 7:37:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/update_imadoc.m
r13 r17 11 11 if exist(outputfile,'file');%=1 if the output file already exists, 0 else 12 12 t=xmltree(outputfile); %read the file 13 backupfile=outputfile; 14 testexist=2; 15 while testexist==2 16 backupfile=[backupfile '~']; 17 testexist=exist(backupfile,'file'); 18 end 19 [success,message]=copyfile(outputfile,backupfile);%make backup 13 20 uid=find(t,'ImaDoc'); 14 21 if ~isequal(uid,1) … … 21 28 [t,uid_calib]=add(t,1,'element','GeometryCalib'); 22 29 else %if GeometryCalib already exists, delete its content 23 backupfile=outputfile;24 testexist=2;25 while testexist==226 backupfile=[backupfile '~'];27 testexist=exist(backupfile,'file');28 end29 [success,message]=copyfile(outputfile,backupfile);%make backup30 % backupfile=outputfile; 31 % testexist=2; 32 % while testexist==2 33 % backupfile=[backupfile '~']; 34 % testexist=exist(backupfile,'file'); 35 % end 36 % [success,message]=copyfile(outputfile,backupfile);%make backup 30 37 if isequal(success,1) 31 38 delete(outputfile)
Note: See TracChangeset
for help on using the changeset viewer.