function conversion() { var registrarCode = Project.Variables.code.Value("codeRegister"); var url = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Deissuance\\deissuance.sti"; var zip = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Deissuance\\deissuance.zip"; var account = Project.Variables.getAccount1.Value("sid1"); var securityCode = Project.Variables.code.Value("instrumenLocalCode"); var certif8 = Project.Variables.certificate.Value("certif8"); var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); var yyyy = today.getFullYear(); today = yyyy + mm + dd; var template = '\n'+ '\n'+ ''+certif8+'\n'+ ''+registrarCode+'\n'+ ''+account+'\n'+ 'LOCAL\n'+ ''+securityCode+'\n'+ '80\n'+ ''+today+'\n'+ 'DEISSUANCE\n'+ ''+certif8+'\n'+ '281-360\n'+ 'B\n'+ 'TRAD\n'+ '\n'+ '' ; if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } else { aqFile.Delete(url); aqFile.Delete(zip); if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } } }