<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\test") fo.Move("c:\NovoTest") set fo=nothing set fs=nothing %>Retirado do site da w3schools
- Fórum WMO
- → Info_Tec's Content
Info_Tec's Content
There have been 186 items by Info_Tec (Search limited from 20/04/2023)
#410855 Renomear Uma Pasta
Posted by Info_Tec on 22/07/2004, 16:28 in ASP
#410182 Quebrar Palavra
Posted by Info_Tec on 21/07/2004, 18:06 in ASP
Esse corta independente de a palavra ter mais que o limite.Fiz assim..
<%
TMax = 10
Texto = "Se você pensa que caxaça é água, caxaça não é água não, caxaça vem do alambique, e água vem do ribeirão."
x = 10
y = 1
Response.Write Left(Texto,TMax) & "<br>"
Do until x > Len(Texto)
Text = Mid(Texto,x,TMax)
Response.Write Text & "<br>"
Text = ""
y = y + 1
x = y * TMax
Loop
%>
E bareta, como você testou, por favor informe o erro que poderemos corrigir a função.
#410086 Quebrar Palavra
Posted by Info_Tec on 21/07/2004, 15:59 in ASP
Function QuebrarTexto(Texto, TMax) Texto = Split(Texto," ") For x = LBound(Texto) to UBound(Texto) If Len(Texto(x)) > TMax Then Ini = Left(Texto(x),TMax) & "<BR>" Fim = Right(Texto(x), Len(texto(x) - TMax)) While Len(Fim) > TMax Ini = Ini & Left(Fim,TMax) Fim = Right(Fim, Len(Fim - TMax)) Wend Texto(x) = Ini & Fim End If QuebrarTexto = QuebrarTexto & Texto(x) &" " Next QuebrarTexto = Texto End Function
#406426 Dúvida Para Criar Uma Consulta
Posted by Info_Tec on 16/07/2004, 16:27 in ASP
SET numeros = new RegExp numeros.Pattern = "^[0-9.\-]+$" IF numeros.Test(vbusca) THEN 'para cpf incluir = "Select * from tbsocios where cpf = '"&vbusca&"'" Set RS = conObj.Execute(incluir) ELSE 'para nome incluir = "Select * from tbsocios where nome = '"&vnome&"'" Set RS = conObj.Execute(incluir) END IF If Not RS.EOF Then response.write(vbusca)' Exibe o que vc quer do banco Else response.Write("inexistente")' Não tem nada End If
#406176 Quais Os Custos Para Se Trabalhar Com Asp?
Posted by Info_Tec on 16/07/2004, 12:39 in ASP
#406156 Sobre Inclusão
Posted by Info_Tec on 16/07/2004, 12:21 in ASP
Como será uma área administrativa on line, isso lhe dará a mobilidade de usar e editar noticias em qualquer PC com acesso a internet, correto? Então o ideal é que sua TextArea seja bem completa, um editor html em html e JavaScript (existem alguns para download), onde vc fará toda a edição, aplicação de formatação, links e coisas afins.
#405410 Como Descobrir Ansii
Posted by Info_Tec on 15/07/2004, 16:13 in ASP
Caso alguém queira testar é só ver esse Link
#404692 2 Tabelas
Posted by Info_Tec on 14/07/2004, 19:14 in ASP
<% dim dataregistro dsn = "Driver={Microsoft Access Driver (*.mdb)};DBQ= " & Server.MapPath("textos.mdb") set conexao = createobject("adodb.connection") conexao.open dsn sql = "SELECT Assuntos.*, Textos.* FROM assuntos,textos where assuntos.assunto_id = textos.assuntoid order by Textos.data desc, Textos.assuntoid;" set rs = conexao.execute(sql) do while not rs.eof data = rs("data") ' assuntoid = rs2("assunto_id") assuntoid = rs("assuntoid") id = rs("ID") titulo = rs("titulo") ' link = ""& titulo &"</a>" assunto = rs2("assunto") ' link2 = "["& assuntoid &"]</a>" if dataregistro <> data then dataregistro = data response.write "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td height='20' background='../imagens/fundotopicos.gif' align='center'><b><font class='festa'>"& data &"</font></b></td></tr></table>" response.write "<table width='100%' border='0' cellpadding='0' cellspacing='5'><tr><td height='20' align='left'><a class='festa' href='index.asp?acao=filtrar&assuntoid="& assuntoid &"' target='_parent'>["& Assunto &"]</a> <a class='linker' href='ver.asp?id="& id &"'> "& titulo &"</a></td></tr></table>" else response.write "<table width='100%' border='0' cellpadding='0' cellspacing='5'><tr><td height='20' align='left'><a class='festa' href='index.asp?acao=filtrar&assuntoid="& assuntoid &"' target='_parent'>["& Assunto &"]</a> <a class='linker' href='ver.asp?id="& id &"'> "& titulo &"</a></td></tr></table>" end if rs.movenext loop %>Testa e retorne informando, OK?
- Fórum WMO
- → Info_Tec's Content
- Privacy Policy
- Regras ·