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>
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.