Error Showing in Downloading the file from Cron

rm(list=ls())
library(dplyr)
#library("rpivotTable")
library(tidyr)
library(tidyverse)
library(reshape)
library(reshape2)
input_path="C:\Users\agrawal.rahul\Documents\pc_cutoff\"
setwd(input_path)
date<-"14"
time<-"23"
name <- paste0("http://10.24.9.160/PC-CutOffReports_CVP/pc_cutOff_Report_2022-Sep-",date,"_",time,".csv.gz")
download.file(name,paste0(input_path,"pc_cutoff",date,".csv.gz"))

http://10.24.9.160/PC-CutOffReports_CVP/PC_CutOff_Report_2022-Sep-14_23.csv.gz

########ERROR###########
trying URL 'http://10.24.9.160/PC-CutOffReports_CVP/pc_cutOff_Report_2022-Sep-14_23.csv.gz'
Error in download.file(name, paste0(input_path, "pc_cutoff", date, ".csv.gz")) :
cannot open URL 'http://10.24.9.160/PC-CutOffReports_CVP/pc_cutOff_Report_2022-Sep-14_23.csv.gz'
In addition: Warning messages:
1: In download.file(name, paste0(input_path, "pc_cutoff", date, ".csv.gz")) :
downloaded length 0 != reported length 28
2: In download.file(name, paste0(input_path, "pc_cutoff", date, ".csv.gz")) :
cannot open URL 'http://10.24.9.160/PC-CutOffReports_CVP/pc_cutOff_Report_2022-Sep-14_23.csv.gz': HTTP status was '404 Not Found'

Hi @rahul.agarwal1422,
I suspect there is an error in the composition of the URL.
Can you reach this file using your browser?
http://10.24.9.160/PC-CutOffReports_CVP/PC_CutOff_Report_2022-Sep-14_23.csv.gz

I cannot access that file from my machine.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.