Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Duplicare file con FSO

  1. #1
    Utente di HTML.it L'avatar di Giubass
    Registrato dal
    Oct 2003
    Messaggi
    169

    Duplicare file con FSO

    Ciao ragazzi, volevo sapere se è possibile duplicare x volte un file generico tipo .gif, .doc ecc. quindi un file con qualsiasi estensione, il tutto tramite FSO.


    Grazie

  2. #2
    lo copy, però ogni volta che lo fai devi modificare il nome
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  3. #3
    Utente di HTML.it L'avatar di Giubass
    Registrato dal
    Oct 2003
    Messaggi
    169
    Io fino ad ora avevo provato a duplicare delle pagine e fin quì tutto ok, per fare questo ho utilizzato questo script:

    codice:
    <% Dim Conn, StrConn
    
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = "& Server.MapPath("mdb-database/db1.mdb") &";"
    
    SQL = " SELECT * FROM Comuni ORDER BY Comuni.Id DESC "
    Set RS = Server.CreateObject("ADODB.Recordset")
    RS.Open SQL, Conn, 1, 3
    If NOT RS.EOF Then
    Do While Not RS.Eof
    nome = RS("Comune")
    nome = Replace(nome, "'", "")
    nome = Replace(nome, " ", "")
    nome = Lcase(nome) 
    Response.Buffer = True
    Dim objXMLHTTP, xml
    pagina="http://localhost/fso/com.html"
    Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    xml.Open "GET", pagina, False 
    xml.Send   
    strHtml = xml.responseText
    Set FSO = CreateObject("Scripting.FileSystemObject")
    sPath = Server.MapPath("public/"&nome&".html")
    Set F = FSO.CreateTextFile(sPath, True)
    F.WriteLine(strHtml)
    F.Close
    Set F = Nothing
    Set FSO = Nothing
    set xml = Nothing
    RS.MoveNext
    Loop
    End if
    RS.Close
    Set RS = nothing
    %>
    Adesso però dovrei duplicare un file .gif ma questo script non va bene. Cosa mi consigliate?



Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.