![]() Example |
![]() ![]() ![]() |
dcFileOperations component.
|
property FileList: TStrings;
|
The FileList property specifies one or more source file names (including full path). You should enumerate the source files or folders as items of this string list. The items can contain wildcard characters (? and *). If the file contains spaces you have to take it in quotes (i.e: C:\The Bitmap.bmp must be added as "C:\The Bitmap.bmp"). For example:
|
|
FileList.Clear;
|
|
FileList.Add('C:\myfiles\document??.txt');
|
FileList.Add('C:\myfiles\picture.gif');
|
// long names must be in quotes !!
|
FileList.Add('"C:\My Bitmaps\*.bmp"');
|
// or...
|
for I := 0 to SomeItems.Count - 1 do
|
FileList.Add('"' + SomeItems[I] + '"')
|
|
When you are using Copy or Move operations, these files will be copied or moved to the folder specified by the DestFolder property (If you call Delete, the files will be moved to "Recycled bin".)
|
|
If you wish to specify multiple locations where you would like to store moved or copied files, you can describe new locations near the originals, spearating them by "=" sign.
|
|
FileList[0]:='C:\myfiles\document??.txt=c:\mydocuments';
|
FileList[1]:='C:\myfiles\picture.gif=d:\mypictures';
|
FileList[2]:='"C:\My Bitmaps\*.bmp"="d:\bitmaps"';
|
|
![]() |
|
FileList.Clear;
|
FileList.Add('C:\myfiles\document.txt=c:\myfiles\mydoc.doc');
|
FileList.Add('C:\myfiles\picture.gif=c:\myfiles\greatpic.gif');
|
DestFolder property;
|
Copy, Move, Rename and Delete methods.
|