Compare commits
No commits in common. 'e3625793da81090da540234f11169f2debcfe2a7' and '5b03a6c7a9cc941831afd171c5de22ea6ed2df2f' have entirely different histories.
e3625793da
...
5b03a6c7a9
@ -1,61 +0,0 @@ |
|||||||
from pathlib import Path |
|
||||||
from dataclasses import dataclass |
|
||||||
import os |
|
||||||
from datetime import datetime, timedelta, date |
|
||||||
|
|
||||||
import shutil as sh |
|
||||||
|
|
||||||
class Report: |
|
||||||
|
|
||||||
def __init__(self, sample_file: str, sample_folder: str): |
|
||||||
self.sample_file: Path = Path(sample_file) |
|
||||||
self.folder_name: Path = Path(sample_folder) |
|
||||||
|
|
||||||
def create_record(self, location: Path) -> Path|None: |
|
||||||
|
|
||||||
# Create the folder |
|
||||||
fp = Path(location, self.folder_name) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main(): |
|
||||||
|
|
||||||
folders = [ |
|
||||||
Report(r"InputFiles\2022.09.02_ACH_C", r"ACH"), |
|
||||||
Report(r"InputFiles\2022.09.02_PROGPAY_BER", r"CHECKS LIVE"), |
|
||||||
Report(r"InputFiles\2022.09.01_VMCC_BER", r"CREDIT CARDS"), |
|
||||||
Report(r"InputFiles\2022.09.02_DISPOSITION_PM_C", r"DISPOSITION REPORTING"), |
|
||||||
Report(r"InputFiles\2022.09.02_LOCKBOX_094_C", r"LOCKBOX"), |
|
||||||
Report(r"InputFiles\2022.09.02_PBP_EPAY_DPS_BER", r"PAY BY PHONE"), |
|
||||||
Report(r"InputFiles\2022.12.30_PBP_EPAY_RETURNS_BER", r"RETURN REPORTING"), |
|
||||||
Report(r"InputFiles\2022.09.01_PUB_WIRES_BER", r"WIRES"), |
|
||||||
] |
|
||||||
|
|
||||||
folder_date = date(2023,1,1) |
|
||||||
|
|
||||||
while folder_date < date(2024,1,1): |
|
||||||
|
|
||||||
year = folder_date.strftime("%Y") |
|
||||||
month = folder_date.strftime("%Y.%m") |
|
||||||
day = folder_date.strftime("%Y.%m.%d") |
|
||||||
|
|
||||||
date_path = Path(year, month, day) |
|
||||||
|
|
||||||
for rp in folders: |
|
||||||
|
|
||||||
|
|
||||||
# Create folder |
|
||||||
fold_p = Path(date_path, rp.folder_name) |
|
||||||
print(f"Creating filepath: {fold_p}") |
|
||||||
os.makedirs(fold_p, exist_ok=True) |
|
||||||
|
|
||||||
file_p = Path(fold_p, rp.sample_file.name) |
|
||||||
print(f"Cp {rp.sample_file} into {file_p}") |
|
||||||
|
|
||||||
sh.copyfile(rp.sample_file, file_p ) |
|
||||||
|
|
||||||
folder_date += timedelta(days=1) |
|
||||||
|
|
||||||
if __name__ == "__main__": |
|
||||||
|
|
||||||
main() |
|
||||||
@ -0,0 +1 @@ |
|||||||
|
name = "Test Name" |
||||||
@ -1,14 +1,14 @@ |
|||||||
debug = true |
debug = true |
||||||
consolidatedBasePath = "" |
consolidatedBasePath = '\\leafnow.com\shared\Accounting\CASH APPS\2023' |
||||||
|
|
||||||
[defaultLocations] |
[defaultLocations] |
||||||
ach = "//leafnow.com/shared/Business Solutions/Griff/Code/InfoLeaseExtract/2023/2023.03/2023.03.01/ACH" |
ach = '' |
||||||
disp = "" |
disp = '' |
||||||
gl = "" |
gl = '' |
||||||
lb = "//leafnow.com/shared/Business Solutions/Griff/Code/InfoLeaseExtract/2023/2023.03/2023.03.01/LOCKBOX" |
lb = '' |
||||||
minv = "" |
minv ='' |
||||||
niv = "" |
niv = '' |
||||||
ren = "" |
ren = '' |
||||||
pymt = "" |
pymt = '' |
||||||
uap = "" |
uap ='' |
||||||
pastdue = "" |
pastdue = '' |
||||||
|
|||||||
Loading…
Reference in new issue