+++++++++++++++++++++++++++++++++++++++++++++++++
Declare Function CopyFile Lib "kernel32" Alias "CopyFileA"
(ByVal lpExistingFileName As String,
ByVal lpNewFileName As String,
ByVal bFailIfExists As Integer) As Integer
Declare Function MoveFile Lib "kernel32" Alias "MoveFileA"
(byval lpExistingFileName as string,
byval lpNewFileName as string) as Integer
Declare Sub Main
Sub Main
Dim nRet as integer, file_from as string, file_to as string
file_from = "filea.txt"
file_to= "fileb.txt"
nRet = CopyFile (file_from,file_to,1)
nRet = MoveFile (file_from,file_to)
End Sub
.
+++++++++++++++++++++++++++++++++++++++++++++++++
Not tested though..
Regards
Bo Victor Thomsen
Aestas-GIS
Denmark
> --
> You received this message because you are subscribed to the
> Google Groups "MapInfo-L" group.To post a message to this group, send
> email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:
> http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page at
> http://groups.google.com/group/mapinfo-l?hl=en
Hi Brad,
Have you tried the Save File command in Mapbasic?
Syntax
Save File old_filespec As new_filespec [ Append ]
old_filespec is a string representing the name (and, optionally, the path) of an existing file; the file must not be open.
new_filespec is a string representing the name (and, optionally, the path) to which the file will be copied; the file must not be open.
Description
The Save File statement copies a file. The file must not already be open for input/output.
If you include the optional Append keyword, and if the file new_filespec already exists, the contents of the file old_filespec are appended to the end of the file new_filespec.
Do not use Save File to copy a file that is a component of an open table (for example, filename.tab, filename.map, etc.). To copy a table, use the Commit Table...As statement.
The Save File statement cannot copy a file to itself.
Example
Save File "settings.txt" As "settings.bak"
Sems like that might work?
Regards
Martin Hodder
Higher Mapping Solutions
www.highermappingsolutions.com
--