简体   繁体   中英

How to download google sheets file to specific folder in cpanel using wget cron

I have a working cron job but I can't get it to download my file into my target destination. At the moment, the file is downloaded into the root folder in cpanel.

Here is what I have:

wget --no-check-certificate 'https://docs.google.com/spreadsheets/d/[...]/edit?usp=sharing' -O file.xlsx

Now defining the destination folder doesn't work. Here's how I'm doing it:

wget --no-check-certificate 'https://docs.google.com/spreadsheets/d/[...]/edit?usp=sharing' -O 'public_html/wp-content/uploads/import/files' file.xlsx

This doesn't download any file. Not sure what I could be missing.

Managed with this:

wget --no-check-certificate 'https://docs.google.com/spreadsheets/d/[...]/edit?usp=sharing' -O public_html/wp-content/uploads/import/files/file.xlsx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM