BookmarkSubscribeRSS Feed
Miracle
Barite | Level 11

Hi there.

May I know if anyone is able to share the code/macro that has been written before by someone to automate the backup of files(SAS programs, datasets, log files, output files)?

As such that it will create a new folder with the date of the backup being done and move all the files from directory A into it?

Thank you in advance.

5 REPLIES 5
SASKiwi
PROC Star

You would be better off using a tool designed specifically for backups. If you are talking about SAS server folders then these are probably backed up automatically anyway. If you are talking about a PC then ask about the tools your company uses with your IT folks.

 

For PCs, Windows Explorer is an easy way to create backups of local drives.

Miracle
Barite | Level 11

Hi @SASKiwi, thank you for your reply.

 

And my apologies for not making it clear in the first place.

Yes, it is the latter the PC. 
May I know if there is any step-by-step instruction using Windows Explorer online?

Thank you in advance. 

SASKiwi
PROC Star

Windows Explorer could hardly be any easier. Right-click on a source folder and select Copy. Right- click on a target folder or drive, select Paste. If you need more help just Google: Windows Explorer copy folder.

Miracle
Barite | Level 11

@SASKiwi I see! My brain must be dead at the time. Thanks Smiley Very Happy 

SASKiwi
PROC Star

@Miracle - No problem, always happy to help!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1629 views
  • 5 likes
  • 2 in conversation