function CopyFileTo(const Source: string; const Destination: string): Boolean;
Parameters
const Source: string
Source file name.
const Destination: string
Destination file name.
Returns
Boolean - True if the file is copied, False on error.
Description
CopyFileTo is a function used to copy the file specified in Source to the file specified in Destination.
CopyFileTo will return False if the file in Destination already exists.
CopyFileTo encapsulates the platform-specific calls needed to perform the file copy operation. On the Windows platform, this is the Win32 API function CopyFile. On the Linux platform, CopyFileTo uses a TFileStream instance to create the destination file.
EzyRyder 님이 쓰신 글 :
: 안녕하세요?
: 제가 하려고 하는것은
: 버튼 1을 누르면 테이블(파일)이 하나 생성됩니다.(이건 되구요.)
: 버튼 2를 누르면 위의 테이블(파일)을 다른 폴더로 다른파일이름
: 으로 저장하려 합니다.(폴더와 파일이름은 사용자가 직접 입력
: 할수 있어야 합니다.)
: 그래서 savedialog 를 사용하고 싶은데..
: 그니까..이 둘을 사용해서 버튼2를 누르면 savedialog 가 열리면서 자동으로 버튼1을 눌렀을때 생기는 파일을 가지고 다른이름으로 저장하고 싶습니다.
: 꼭 이방법이 아니더라도 이미 생성된 파일을 다른이름으로 저장하는 방법을 아시는분들의 도움을 구합니다.
: 그럼 모두들 건강하세요.
|