Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 22
  1. #1

    pkzipc: estrarre zip con asp

    Devo scompattare un file zip presente sul server con ASP.
    Utilizzo il seguente codice, ma lo script va in timeout... quele potrebbe essere il problema?

    Codice PHP:
    Function extractZipFile(theZipExePaththeSourcePaththeDestinationPath)
        
    Set Shell CreateObject("WScript.Shell")
            
    theCMD theZipExePath " -oq " &  theSourcePath " -d " theDestinationPath                                    
            Set oExec 
    Shell.Exec(theCMD)                                                                
                Do While 
    oExec.Status 0                                            
                Loop
            Set oExec 
    nothing
        Set Shell 
    nothing    
    End 
    Function

    zipExePath "C:\Programmi\PKWARE\PKZIPC\pkzipc.exe"
    sourcePath fileroot "_materiale/x importazione/zipCaricato/Export20080401105717.zip"
    destinationPath fileroot "_materiale/x importazione/new/"

    Call extractZipFile(zipExePathsourcePathdestinationPath

  2. #2
    Prova a commentare le righe
    Do While oExec.Status = 0
    Loop

  3. #3
    Originariamente inviato da Domenix
    Prova a commentare le righe
    Do While oExec.Status = 0
    Loop

    No... così ho dovuto riavviare il PC perchè lo script si è appropriato di tutte le risorse della macchina...

    Altre idee?

  4. #4
    Non credo che sia stato quello il problema.
    Commentale e riprova.
    Semmai dimmi se usi Norton Antivirus o altri che usano lo script blocking.

  5. #5
    Originariamente inviato da Domenix
    Non credo che sia stato quello il problema.
    Commentale e riprova.
    Semmai dimmi se usi Norton Antivirus o altri che usano lo script blocking.
    Mi si è impiantato proprio commentando quelle righe...
    No non ho installato nulla che mi blocca gli script

  6. #6
    Fai così per vedere che succede nella shell di dos
    codice:
    Function extractZipFile(theZipExePath, theSourcePath, theDestinationPath)
        Set Shell = CreateObject("WScript.Shell")
            theCMD = theZipExePath & " -oq " &  theSourcePath & " -d " & theDestinationPath                                    
            'Set oExec = Shell.Exec(theCMD)                                                                
            '    Do While oExec.Status = 0                                            
            '    Loop
            'Set oExec = nothing
            response.write theCMD
        Set Shell = nothing    
    End Function
    
    zipExePath = "C:ProgrammiPKWAREPKZIPCpkzipc.exe"
    sourcePath = fileroot & "_materiale/x importazione/zipCaricato/Export20080401105717.zip"
    destinationPath = fileroot & "_materiale/x importazione/new/"
    
    Call extractZipFile(zipExePath, sourcePath, destinationPath)
    Poi prendi la riga stampata sul browser, apri una finestra DOS sul tuo pc e gliela incolli e vedi cosa succede.

  7. #7
    PKZIP(R) Server Version 12 for Windows Evaluation Version
    Portions copyright (C) 1989-2007 PKWARE, Inc. All Rights Reserved.
    PKZIP Reg. U.S. Pat. and Tm. Off. Patent No. 5,051,745
    Other U.S. and international patent applications pending

    Thank you for evaluating PKZIP(R). There are 30 days left in your evaluation
    period. Use of this software after the evaluation period requires purchase of a
    license for this machine. Contact PKWARE, Inc. at http://www.pkware.com/ for
    information on licensing this product.

    PKZIP: (E4) Unknown or illegal option - oq


    ... ok... ora devo solo scoprire qual'è l'opzione corretta....

  8. #8
    Quel codice l'ha scritto "un mio amico" che nel forum si chiama Mems e non usava l'exe di PKZip... mo non mi ricordo quale usavo.

  9. #9

  10. #10
    Ho usato un exe di nome unzip.exe (159744 byte)

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 © 2025 vBulletin Solutions, Inc. All rights reserved.