CAN SOMEONE PLEASE HELP ME HERE?
i have 35-40 excel files in one folder and i want to copy all those files to another folder how can i do it using SAS?
Thanks!
Why using SAS? Anyways, assuming Windows, you can use %sysexec copy, so you can use a pipe to get the list of files and move then that way.
The code to move one file is below:
%sysexec copy
"Path to first file"
"Path to second file";
Why using SAS? Anyways, assuming Windows, you can use %sysexec copy, so you can use a pipe to get the list of files and move then that way.
The code to move one file is below:
%sysexec copy
"Path to first file"
"Path to second file";
Thanks Reeza - but for this i really hv to stuck with SAS code. Actually our people wants SAS code to do this transformation since i will include piece of code which would send email to my manager and users once all files have been transferred...
Thanks!!!
That is SAS code...its what I use to copy excel files in SAS
Reeza - one more thing is - we will not sure how many excel files will be there each week....because this depends on users to have input for weekly or not - so one week we have 35 and other week may be 40....and we have to transfer all files every week, whatever it has...i really confuse with this....don't know what to use...
Thanks for your quick response....
Search the forum here, or google on using SAS to pipe in a list of file names from a directory.
25074 - Listing all files that are located in a specific directory
24820 - Creating a Directory Listing Using SAS for Windows
If you're on SAS 9.4 there's FCOPY (File Copy) but some basic google searches are coming up a few solutions out there already.
Thanks for your time Reeza!!!
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.