Hi Reeza,
The other question which you are refering to (and which you answered) is the one about creating a folder based on the file names and transfering the files into that folder. But the original files remain, so now I have 2 files: the one which is transfered into the folder, and the original one. So what I would like to achieve is to delete the original files.
I have a column for the file name and for the file path, and when I run the following code:
data test;
set filelist;
rc=filename(the_name,the_path);
if rc = 20014 and fexist(the_name) then
rc=fdelete(the_name);
rc=filename(the_name);
run;
I get a message that the fileref in fexist exceeds 8 characters and will be truncated, and as a result the original files are not deleted.
I also included quotes for the names and paths (for exampel, a file name in the column the_name is of the form "file1.txt" instead of file1.txt ) but the origina files are still not deleted.
Also, I did rc = 20014 becasue that's the value that I get, and when I do rc = 0 I don't even get the message that the fileref will be truncated etc. and the original files are still there.
Thanks!
... View more