LParameter tcSource, tcTarget Set Safety off *------------------------------------------------------------------ * Determine type of source file *------------------------------------------------------------------ Local lcType, lcFile, lcAction lcAction = "" DO Case Case InList( Upper(JustExt(m.tcSource)), "SCT", "SCX" ) lcType = "K" lcFile = ForceExt(m.tcSource,"SCX") Case InList( Upper(JustExt(m.tcSource)), "LBT", "LBX" ) lcType = "B" lcFile = ForceExt(m.tcSource,"LBX") Case InList( Upper(JustExt(m.tcSource)), "MNT", "MNX" ) lcType = "M" lcFile = ForceExt(m.tcSource,"MNX") Case InList( Upper(JustExt(m.tcSource)), "SCT", "SCX" ) lcType = "K" lcFile = ForceExt(m.tcSource,"SCX") Case InList( Upper(JustExt(m.tcSource)), "FRT", "FRX" ) lcType = "R" lcFile = ForceExt(m.tcSource,"FRX") Case InList( Upper(JustExt(m.tcSource)), "VCT", "VCX" ) lcType = "V" lcFile = ForceExt(m.tcSource,"VCX") Case InList( Upper(JustExt(m.tcSource)), "FPT", "DBF" ) lcType = "" lcAction = "XML" lcFile = ForceExt(m.tcSource,"DBF") Otherwise lcAction = "COPY" lcType = "" Endcase *------------------------------------------------------------------ * Call either SCCText or just copy the file *------------------------------------------------------------------ DO Case Case m.lcAction = "COPY" Copy File (m.tcSource) to (m.tcTarget) Case m.lcAction = "XML" USE (m.lcFile) Shared CursorToXML(Alias(),m.tcTarget,1,2+8+512+4096,0,"1") Otherwise DO SccText with m.lcFile, m.lcType, m.tcTarget, .T. Endcase