auto generate date path
This commit is contained in:
parent
ffdebde177
commit
a7f122b623
5
main.py
5
main.py
|
@ -21,8 +21,8 @@ if __name__ == "__main__":
|
|||
ftp.Login('jh_zhao_asagi.waseda.jp', 'SP+wari8')
|
||||
|
||||
# 从目标路径ftp_filePath将文件下载至本地路径dst_filePath
|
||||
dst_filePath = './data'
|
||||
dst_filePath = dst_filePath + "/" + dt.datetime.strftime(today, '%Y-%m-%d')
|
||||
dst_filePath_root = './data'
|
||||
dst_filePath = dst_filePath_root + "/" + dt.datetime.strftime(today, '%Y-%m-%d')
|
||||
if not os.path.exists(dst_filePath):
|
||||
os.makedirs(dst_filePath)
|
||||
|
||||
|
@ -85,6 +85,7 @@ if __name__ == "__main__":
|
|||
_hourStr = [f"0{x}" if x < 10 else str(x) for x in range(23)]
|
||||
_yearStr, _monStr, _dayStr = Daod.getDateStr(_yearNum, _monNum, _dayNum)
|
||||
ftp_filePath = "/pub/himawari/L2/PAR/020" + "/" + _yearStr + _monStr + "/" + _dayStr + "/"
|
||||
dst_filePath = dst_filePath_root + "/" + dt.datetime.strftime(today, '%Y-%m-%d')
|
||||
Download_Path = dst_filePath + "/PAR_Minutes_Download"
|
||||
if not os.path.exists(Download_Path):
|
||||
os.makedirs(Download_Path)
|
||||
|
|
Loading…
Reference in New Issue