Hello all, I would like to copy all csv files from a specific folder to another one. Below is the code which I am currently using: data _null_; length fref $8 fname $200; did = filename(fref,'\\files\FEB_P000\Reporting_FS\Accounting log'); did = dopen(fref); do i = 1 to dnum(did); fname = dread(did,i); IF find(FNAME,'.csv') then do; %let pathscr = //files/FEB_P000/Reporting_FS/Accounting log; %let pathdes = //files/FEB_P000/Reporting_FS/Accounting log/2021; %let file = FNAME; libname IN "&pathscr"; libname IN "&pathdes"; filename src "&pathscr/&file"; filename des "&pathdes/&file"; rc= fcopy('src','des') put rc=; end; end; run; However when is executes, no error is displayed (rc= 20006) but the files are not copied. When I hard code the variable '&file' with the exact file name, the file is copied. Can anyone help please?
... View more