0

I need to extract each week a list of files in a remote folder on my internet site. I need to retrieve the url to use those jpeg in an offline application, to load the images random. Also maybe useful to have directly random generate only one url each time the script is executed. If it's possible I'd like to use a batch file or a PowerShell script. I've ftp access but the link must be http and I want to save it in a txt file. If it possible I need also to take only jpeg that has name character > 20.


I think, maybe done by executing a php script in the folder that retrieve me the random url, than have a batch file that read each time this php file and copy the url inside it to a txt file. But I need to understand how to write those 2 scripts.

4
  • 1
    Would you like an answer about cron/ftp/grep? Ah, what is your operating system?
    – Nicolas Raoul
    Feb 15, 2019 at 9:25
  • I can access only to ftp, I can't set the cron. The operating system I think is windows. I don't have any privileges. My need is to have a complete http url to set it inside a mail. If for example there's a php script that each time opened give the url of a random image, inside a specific folder... in this case the folder is the wordpress upload one.
    – BigBlack
    Feb 15, 2019 at 23:44
  • wget and its mirroring options are what you want.
    – ivanivan
    Feb 16, 2019 at 1:13
  • I Think wget download contents? I don't need to download it, but only have a random url from a folder.
    – BigBlack
    Feb 16, 2019 at 17:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.