Here is a tool that can help you do file manipulations like the ones you described. If you open a command window, and type DO32 without parameters, you get this short help: =========================================================== Usage : do /options Substitutions: $=Full Path #=Relative path @=File name !=Path+Name (no changes) {=name }=extension ?=Sequence number Options : S do subdirectories Q prompted D include only directory names E do not echo line before executing Irhsa include files with these attributes Xrhsa exclude files with these attributes Adate files >= this date Bdate files <= this date Wca|b as above, use windows create date Waa|b as above, use windows access date dates can be DDMMYY or +-[n], where n is days from today if month or year in not specified, current month/year are used File spec : @name means read file list from if name is blank, means standard input if command is blank, file names are echoed to standard output =================================================================== let me try to explain what it does. The pseudo-language for the program would be : FOR all files in list apply substitutions to the typed command execute result NEXT in other words, it executes the typed command for each file selected, using file name substitutions. as you see in the syntax, the option parameters are typed first, then the file specification, then the command. It is always a good idea to enclose the command part in double quotes. if the command itself needs to contain quotes (eg for long file names with spaces in them, which need to be quoted), use single quotes around the command, and double quotes within the command (or the other way around, I am not sure, test it). Remember, you can always see that the program will do, and have a chance to cancel it, by using the /Q option, which asks yes/no before doing anything. Selecting files =============== The file names that the program will operate on are selected in two ways: a. you can type a usual file pattern selection, like *.mp3 or a*g.doc b. you can supply a list of file names that is read from a text file (the second case allows you to specify files that have nothing in common in terms of name, or even reside in different directories) If you want to use syntax (b), precede the name of the file that contains the list with an "@". example: do32 @list.txt command... Operating on files ================== it is important to understand that do32 itself does NOT do anything to the files. it is the COMMAND that you type which does the work. so, in essense, do32 can do to a list of files whatever can be done via command-line programs to files. in advanced usage, the list of "files" may even NOT contain existing file names at all! (I will give an example later) Options ======= Options are useful only when you are selecting files from the file system via patterns, and NOT when you are passing a list to the program. so, when you use the @ syntax, do not bother about options Metacharacters ============== Metacharacters are used for macro substitution of parts of the file name specified. when do32 processes a selected "file" name, it does the following substitutions: $=Full Path (only the directory part, not the filename) #=Relative path (same as above) @=File name !=Path+Name (no change), equivalent to $@ {=name }=extension ?=Sequence number so, given the file name : C:\delphi7\utils\robot\html\personnel.htm then, $ = C:\delphi7\utils\robot\html\ @ = C:\delphi7\utils\robot\html\ ! = C:\delphi7\utils\robot\html\personnel.htm { = personnel } = .htm ? = 1..N, sequence number of selection This is useful for constructing commands that operate on the file names, but need to change some part of the filename: Lets see some examples: First, cases of selecting files via patterns: *. null command. echoes the selection do32 *.* Lists all files do32 /s *.* lists all files and all sub-directories of the current directory. do32 /s /a-5 *.* list all files that have been modified in the last 5 days in all subdrectories do32 /s /a010605 *.mp3 list mp3 files that have been modified after 01-june-2005 (note the date syntax: DDMMYY) dates can be relative to today also, by adding a + or - before the number of days. so /a-5 means 5 days ago, /a+0 means today, and /a+1 means tomorrow ("a"="after", there is also a "b" for "before") do32 /s /a+0 *.* list all files modified today *. now lets see some commands applied on the selected files: (I will not give any more examples of using options to select files. the above examples should be enough. remember, you can use options with any of the examples, but NOT with the "file list from text file" mode) assuming that you have the following files in the current directory: a.txt b.txt do32 *.* "copy @ a:\@" will execute the following commands: copy a.txt a:\a.txt copy b.txt a:\b.txt do32 *.* "copy @ a:\{.bak" will execute the following commands: copy a.txt a:\a.bak copy b.txt a:\b.bak At this point, you should say AAAA. you see, what the program does is to take each file NAME (not actual file), apply parsing and then apply substitutions to the command, and then run the command. it is essentially a macro expander for file names and command-line programs! what you can do with it is limited by your imagination. let me give you a full example relative to what you want to do. lets say that you have a program that can convert .wav files to .mp3 files from the command line, and it is called WAVTOMP3, but the idiot programmer did not provide for naming the files corretcly. so, you have to type wavtomp3 abcde.wav abcde.mp3 and cannot use wildcards, so this will not work : wavtomp3 *.wav *.mp3. here is how you do it using DO32 : do32 c:\source\*.wav "wavtomp3 ! d:\myMp3\output\@.mp3" this will execute the program wavtomp3 for each file in the source dir, passing it the appropriate parameter each time. say that you have .ots files, and that you have an OTS2MP3 program that can convert them back to mp3 (in fact I just looked in the web, a program like this DOES exist, it is called MP3OTS.EXE, it is probably somewhere in your ots program directory, which may mean you do not need to keep double copies in .ots and .mp3 format, to save some space. check it out) this would do it: do32 c:\lib\pap*.ots "OTS2MP3 ! c:\new\{.mp3" now, to your specific need, which is quite complex, and a very good example of do32 capabilities: say that you have a file LIST.TXT that contains a file list, like this: c:\lib\a.ots c:\lib\b.ots ... more like this, could even have directory paths say also that you keep a copy of the music files in c:\libMP3, with the same relative paths. the command you want in order to copy the corresponding mp3 files is : do32 @list.txt "copy c:\libmp3\{.mp3 c:\dest" so, the "{" extracts the filename without extension from the files in the list, which you then use to "build" the source filename, by adding an .mp3 extension to it, then copy it to the destination. Easy, eh ? If you had sub-directories also, things could get a little complicated, although it can still handle it. if you wanted to use a DELETE list : do32 @list.txt "del !" move it to a new location, keeping same name: do32 @list.txt "move ! c:\new\@" move and rename at the same time: do32 @list "move ! c:\new\{-new.ots" etc etc