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
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.