![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Перемещения файлов с нужным расширением. [D7]
TyTuk © (2010-08-18 09:05:00)Добрый день , у меня такой вопрос.. как мне переместить несколько файлов ,одного расширения, из одной папки в другую ?
(Имя файлов роли тут играть не должно,перемещение только по расширению файла)
Amoeba_ (2010-08-18 12:17:00) [1]Статья здесь:
http://www.delphikingdom.com/asp/viewitem.asp?catalogid=91
Anatoly Podgoretsky (2010-08-18 10:56:00) [2]> TyTuk (18.08.2010 09:05:00) [0]
ShFileOperation
ixen (2010-08-18 09:46:00) [3]сначало нужно получить список файлов которые нужно переместить отобрав по расширению фалов:
вот пример из справки Delphi 7
type
TFileName = string;
TSearchRec = record
Time: Integer; //Time contains the time stamp of the file.
Size: Integer; //Size contains the size of the file in bytes.
Attr: Integer; //Attr represents the file attributes of the file.
Name: TFileName; //Name contains the filename and extension.
ExcludeAttr: Integer;
FindHandle: THandle;
FindData: TWin32FindData; //FindData contains additional information such as
//file creation time, last access time, long and short filenames.
end;
var
SearchRec: TSearchRec;
procedure TForm1.SearchClick(Sender: TObject);
begin
FindFirst('c:\Program Files\MyProgram\bin\*.*', faAnyFile, SearchRec);
Label1.Caption := SearchRec.Name + ' is ' + IntToStr(SearchRec.Size) + ' bytes in size';
end;
procedure TForm1.AgainClick(Sender: TObject);
begin
if FindNext(SearchRec) = 0 then
Label1.Caption := SearchRec.Name + ' is ' + IntToStr(SearchRec.Size) + ' bytes in size'
else
FindClose(SearchRec);
end;
Andy BitOff (2010-08-18 09:42:00) [4]RenameFile
маска файлов
F1