Hello,
I'm trying to use the rename function (in SAS 9.4) to rename a file, however it appears that because I'm using a forward slash in the new filename, that the rename function will not work. Do you know how I can achieve a forward slash in the new filename please?
This is the code that I've been trying to use.
data _null_;
rc=rename("S:\SEP380-201_201_201201001_EoT_999_ET_SIGMA Past Week_std_260123_Feedback.pdf", "S:\SEP380-201_201_201201001_EoT/ET_SIGMA Past Week_std_260123_Feedback.pdf", 'file');
run;
Many thanks,
Kriss
I don't think you can get SAS to do something that the underlying operating system doesn't support.
C:\downloads>echo "hello" > test1.txt C:\downloads>rename test1.txt "test1/2.txt" The system cannot find the path specified. C:\downloads>
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.