Hello,
I want to move directory as is that contains excel files from one location to another. Which way is the most appropriate?
I have a SAS 9.3 version.
Thank you
You can try this. It works for me
options noxwait;
%let source_path= C:\Users\PNG\Documents;
%let file_name= test.xlsx;
%let destination_path=C:\users\png;
X move &source_path\&file_name &destination_path;
Please give me a like if you find it useful.Thanks!
What OS does your SAS session run on? The required OS command and syntax to move the files depends on the OS. Your SAS session will also need to be able to access OS commands. You can check the required SAS option like this:
proc options option = xcmd;
run;
The best approach would be to do it at the operating system level.
If the source and destination locations are on different computers, then ftp clients like filezilla would be helpful.
If you don't have XCMD enabled you can use this macro to recursively copy a directory from one place to another: https://core.sasjs.io/mp__copyfolder_8sas.html
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.