BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

Hello,

 

I have unzipped a xml file which name is Virage Survey.xml but as you are awarded of, it is not a valid, so how to convert this file name to a valid SAS file name.  Can we also rename this file.

 

 

1 REPLY 1
Ksharp
Super User
/*You could rename these files by RENAME() funtion.*/
%let path= c:\temp\ ;  *the folder included "Virage Survey.xml" ;
data _null_;
rc=filename('x',"&path.");
did=dopen('x');
do i=1 to dnum(did);
 fname=dread(did,i);
 rc=rename(cats("&path.\",fname),cats("&path.\",compress(fname,'._','kad')),'file');
end;
did=dclose(did);
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 569 views
  • 0 likes
  • 2 in conversation