I need take backup of few files everyday.
I have to copy few selected files everyday from one folder and create a new folder with current date (YYYY_MM_DD) and paste those files in this new folder.
Could someone help me how can i achieve this ...
Alternatively you can use python with a function like this:
from ayx import Alteryx
import shutil
import os
import pandas as pd
def archiving(a):
source=a['filepath'].tolist()
destination=a['destination'].iloc[0]
destination=destination.replace('\\','/')
source=[shutil.copy(each,destination) for each in source]
dicty={"newfiles":[destination+os.path.basename(each) for each in source]}
output=pd.DataFrame.from_dict(dicty)
Alteryx.write(output,1)
df=Alteryx.read("#1")
archiving(df)