@BGM , @publicdomain and helpful community.
BGM, your idea is a good one. Copy out, then copy back in. Or rename. Etc.
Trouble is, the file contents will change.
Here is the actual scenario:
I have 100 SAS datasets. Each dataset is alone in its folder. The folder name corresponds to the dataset filename, plus some extra:
Below are the first three folders, and the sole file inside:
I need to update -- add some additional columns -- to each and every dataset file.
The 'program' -- or more accurately, 'script' -- I am going to use to make the changes to each file expects the name of the file to be:
And the location of said file is set to be:
So, it appears that I'll have to use one of the two following approaches:
(first dragging each respective file one at a time to the 'work' folder for the running of the script)
1. Change the 'script' file 100 times, to tailor for the specific prefix.
2. Change the name of each file, temporarily. x100.
Going #2 route, I was thinking of TEMPORARILY changing the filename:
aapl_combined.sas7bdat --> combined.sas7bdat
Then making changes to the dataset file with the existing
Then changing the filename back to what it was before:
combined.sas7bdat --> aapl_combined.sas7bdat
Then dragging the changed dataset file back to its proper, home folder.
This whole rigmarole is likely faced regularly by programmers. There surely are ways and means of conducting things more efficiently. If anyone wants to chime in their thoughts regarding a more orderly process, please speak up.