On 7/21/2003 8:05:18 PM, Scott Smallbeck wrote:
>
>Command: FRen(@1,@2,NOERR)
>
>Errors that will halt Wildfire:
>1. Invalid characters in filename
>2. Unable to copy over read-only file
Workaround for 2.:
File_Attrib(@2,1,RESET) just before the FRen()
Possible workaround for 1.:
#xx=Buf_Num // xx should be a free numerical register
Buf_Switch(Buf_Free(EXTRA))
Reg_Ins(@2) // the target filename
// check for invalid characters in filename
Search('|{\,/,:,*,?,",<,>,||}', BEGIN+NOERR)
Buf_Quit(OK)
Buf_Switch(#xx)
if (EM) { // if no invalid character found
File_Rename(...)
} else {
// do some error handling
}
Christian
|
|