Ir para conteúdo
Fórum Script Brasil

Pesquisar na Comunidade

Mostrando resultados para as tags ''leitura do conteúdo de um arquivo *.log''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • Programação & Desenvolvimento
    • ASP
    • PHP
    • .NET
    • Java
    • C, C++
    • Delphi, Kylix
    • Lógica de Programação
    • Mobile
    • Visual Basic
    • Outras Linguagens de Programação
  • WEB
    • HTML, XHTML, CSS
    • Ajax, JavaScript, XML, DOM
    • Editores
  • Arte & Design
    • Corel Draw
    • Fireworks
    • Flash & ActionScript
    • Photoshop
    • Outros Programas de Arte e Design
  • Sistemas Operacionais
    • Microsoft Windows
    • GNU/Linux
    • Outros Sistemas Operacionais
  • Softwares, Hardwares e Redes
    • Microsoft Office
    • Softwares Livres
    • Outros Softwares
    • Hardware
    • Redes
  • Banco de Dados
    • Access
    • MySQL
    • PostgreSQL
    • SQL Server
    • Demais Bancos
  • Segurança e Malwares
    • Segurança
    • Remoção De Malwares
  • Empregos
    • Vagas Efetivas
    • Vagas para Estágios
    • Oportunidades para Freelances
  • Negócios & Oportunidades
    • Classificados & Serviços
    • Eventos
  • Geral
    • Avaliações de Trabalhos
    • Links
    • Outros Assuntos
    • Entretenimento
  • Script Brasil
    • Novidades e Anúncios Script Brasil
    • Mercado Livre / Mercado Sócios
    • Sugestões e Críticas
    • Apresentações

Encontrar resultados em...

Encontrar resultados que...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Encontrado 1 registro

  1. Senhores(as), Preciso de uma vbs que faça a leitura do conteúdo de um arquivo *.log colocando no corpo de um email, em seguida faça o envio. Não sou expert em vbs, mas consegui desenvolver duas, a primeira faz a leitura do conteúdo de um arquivo .log mostrando em uma janela, e a segunda zipa o arquivo.log e faz o envio por e-mail. Qualquer ajuda é bem vinda. VBS 1 { REM – I create FSO object. Set FSO = WScript.CreateObject("Scripting.FileSystemObject") REM – I Create OTF object . REM – It will containall lines of the C:\FileName.Txt file. Set OTF = FSO.OpenTextFile("C:\script\lab\arquivo.log", 1, True, 0) REM –I run the loop on the OTF object to read all lines of the file. Do While OTF.AtEndOfStream = False REM – The OTF.ReadLine statement reads the current REM – line and move the cursor to the next line. Current_Line= OTF.ReadLine REM – Show the current line. MsgBox (Current_Line) Loop REM – I close the objects Set OTF = Nothing Set FSO = Nothing } VBS 2 { Dim fso, arq Set fso = CreateObject("Scripting.FileSystemObject") For Each objFiles In fso.GetFolder("C:\script\lab\").Files If InStr(objFiles.Name, "arquivo02.log") Then arq = Split(objFiles.Name, ".") fso.MoveFile "C:\script\lab\" & objFiles.Name , "C:\script\lab\TX\" & objFiles.Name End if next caminho = "C:\script\lab\TX\" If fso.GetFolder(caminho).Files.Count > 0 Then Email End If Function Email() Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run (Chr(34) + "C:\Arquivos de programas\7-Zip\7z.exe" + Chr(34) + " a -mx9 -t7z " + Chr(34) + "C:\script\lab\TX\arquivo02.7z" + Chr(34) + " " + Chr(34) + "C:\restless\log\" + Chr(34)) Set objEmail = CreateObject("CDO.Message") objEmail.From = "remetende@email.com.br" objEmail.Subject = "Assunto" objEmail.To = " destino@email.com.br " objEmail.Textbody = "Corpo do email 1 " & chr(13) & "Corpo do email 2" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "192.168.63.4" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update objEmail.Configuration.Fields.Update objEmail.AddAttachment "C:\script\lab\TX\arquivo02.7z" objEmail.Send msgbox("A função foi chamada") End Function }
×
×
  • Criar Novo...