NAME: filemove PURPOSE: Move one file to a new place or name. DESCRIPTION: This routine is meant to provide a common capability of moving files regardless of the operating system. The full suite of possibilities that each OS can support is _not_ supported on all platforms. In fact, there is not even a full range of parameter validation to ensure the use of universal features. Instead, you can get this to work on all platforms only if you keep it simple. Note that this routine does NOT check to see if the destination already exists. That means this routine will quietly overwrite preexisting files. Here are some examples of things that should work: filemove,'file1.dat','file1move.dat' Move file1.dat to file1move.dat in the current directory. filemove,'file1.dat','other' If other is a directory, this will move file1.dat to that directory If other is a file or does not exist, then other will be replace by file1.dat upon completion. filemove,'*.dat','other' Move all files ending in .dat to the directory "other". If other is not a directory or does not exist, this will fail. If you use directory separators (eg., / or \ or : ), you will not be able to move that call of filemove to another platform. Note that the oldfile/newfile inputs can also be string arrays but they must match in length. The lists are matched, one-by-one as if filemove were being called on each string array element pair in turn. CATEGORY: Utility CALLING SEQUENCE: filemove,oldfile,newfile INPUTS: oldfile - Filename of file that exists newfile - Name of file to move to. OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: SILENT - If set, suppresses all chatty output to the screen. OUTPUTS: KEYWORD OUTPUT PARAMETERS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: MacOs only: Unable to move a file at the top level of a disk partition PROCEDURE: MODIFICATION HISTORY: Written by Marc W. Buie, Lowell Observatory, and Dave Osip, MIT, 2000/03/14 verified on MacOS 9 to work for all cases indicated above 2000/03/19 2000/05/08, MWB, fixed minor flaw in Win/DOS operation. Changed from using rename to move.