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!!!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.