We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32942
    • 141 Posts
    Hi folks  grin!

    I hate uploading thousands of files to a ftp, because it takes too much time.
    That’s why I upload a zip file and let the server extract my files to a /tmp folder then I (edit if neccessary and) move them to /.

    Now to automate that stuff, I created a php script that does the dirty job for you ;-)
    Try it and be happy, you can save lotta time.

    Function:
    You select the file to upload and the server uploads the file to the root and extracts the content to /tmp.

    The uploadAndList script is just a simple upload form maybe you need it for your homeserver or something.
    The unzip script is the basic version and unzips only a file. You need to edit two variables for it to work:
    $zip_file = 'example.zip'; // Your zip files name
    $unzip_dir = 'tmp'; // The location where to unzip
    
    Any questions? OK, here is it.

    I recommend using the file "Xsss4hells_uploadExLister-v1.zip" only, but it’s your choice.

    Copyleft  grin not Copyright.
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Watch out users! Generally, you’re only running something like this on a shared-host (that doesn’t offer SSH access.) I bring this up only because I did something similar to this a few years ago, and you have to look out for certain server-setups with an approach like this, because the files/directories that are ultimately created will most likely be from a different owner/group than that of your user account (FTP profile.)

      What you’re likely preventing is being locked out from the files that are created; unable to rename/move/delete...alter in anyway. An experienced user might develop a scripted version of their sought-after commands (to run in the same namespace) but nevertheless, I still caution the weary...

      Otherwise, nice recommendation. Bulk-uploading for CMS installs seriously blows.
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 32942
        • 141 Posts
        Did you encounter problems with my script?
        I’d tried it on several share hosters and it worked fine for me.
        Did you really try it out, or are you just speaking about this kind of scripts?

        I know that script saves CPU- and upload-time for you, but is increasing the server’s CPU time for the period of extraction.