// // BatchCopy.vdm Christian Ziemski 25.08.2005 // if (! File_Exist("C:\XXX\saveold", NOERR)) { File_Mkdir("C:\XXX\saveold") // zu brutal; noch verbessern! if (! File_Exist("C:\XXX\saveold", NOERR)) { exit } } #90=Buf_Num File_Open("C:\xxx\SAP-Daten-retten.txt") Replace("|W|>","", BEGIN+ALL+NOERR) BoF while (! At_EoF) { if (Match("#stop#") == 0) { break } // end it if (Match("#") == 0) { Line(1, NOERR) Continue } // comment if (Match("|[|W]|N") == 0) { Line(1, NOERR) Continue } // empty line Search("|X") if (At_EoL) { Reg_Copy_Block(90, BoL_Pos, Cur_Pos) Reg_Empty(91) } else { Reg_Copy_Block(90, BoL_Pos, Cur_Pos) Search("|!|W") Reg_Copy_Block(91, Cur_Pos, EoL_Pos) } // Reg_Type(90) // M("---") // Reg_Type(91) Call("DOIT") Line(1, NOERR) //GK("Taste...") } return :DOIT: ChDir("C:\XXX\saveold", NOMSG) #91=Buf_num Buf_Switch(Buf_Free(EXTRA)) Reg_Ins(90) BoF Search(":/", ADVANCE) Del_Line(0) EoL Search("/", REVERSE) Del_Block(Cur_Pos, EoL_Pos) BoL Replace("/","\", ALL+NOERR) Reg_Copy_Block(103, 0, EoL_Pos) if (! File_Exist(@103, NOERR)) { Reg_Set(104, "mkdir ") Reg_Set(104, @103, APPEND) System(@104, DOS+SIMPLE+SUPPRESS+OK) } Buf_Quit(OK) Buf_Switch(#91) Reg_Set(92, "pscp -p ") if (Reg_Compare(91,"-r")==0) { Reg_Set(92, "-r ", APPEND) } Reg_Set(92, @90, APPEND) Reg_Set(92, " ", APPEND) Reg_Set(92, @103, APPEND) //Reg_Type(92) //TN(1) //System(@92, DOS+DELETE) // sichtbar System(@92, DOS+SIMPLE+SUPPRESS+OK) // minimiert return