NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/util/uidelete.m

Revision 495 (checked in by cbc, 11 years ago)

Initial import of Stark code.

Line 
1 function uidelete
2
3 % uidelete -- Delete files via dialog.
4 %  uidelete (no argument) deletes one or more
5 %   files selected with the "uigetfile" dialog.
6 %   *** Not for the faint of heart. ***
7  
8 % Copyright (C) 1997 Dr. Charles R. Denham, ZYDECO.
9 %  All Rights Reserved.
10 %   Disclosure without explicit written consent from the
11 %    copyright owner does not constitute publication.
12  
13 % Version of 19-Jun-1998 15:17:32.
14
15 help(mfilename)
16
17 oldPWD = pwd;
18
19 thePrompt = 'Delete Which File?';
20
21 while (1)
22         [theFile, thePath] = uigetfile('*', thePrompt);
23         if ~any(theFile), return, end
24         if thePath(length(thePath)) ~= filesep
25                 thePath = [thePath filesep];
26         end
27         cd(thePath)
28         delete([thePath theFile])
29         thePrompt = 'Delete Another File?';
30 end
31
32 cd(oldPWD)
Note: See TracBrowser for help on using the browser.