全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1454 1
2012-01-10
想在SAS中运行代码,查找出某文件夹下扩展名为.txt的文件的名称?请问各位高手该如何实现?

比如我的计算机的D盘下有个文件,名字为abc.txt,现在想在SAS中提取abc这个文件名字作为变量。

多谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-4-10 15:06:05
获取某一文件夹中文件名
filename indata pipe 'dir C:\tes /b';
data file_list;
length fname $50.;
infile indata truncover; /* infile statement for file names */
input fname $50.; /* read the file names from the directory */
call symput ('num_files',_n_); /* store the record number in a macro variable */
run;
更多参考http://www.cnblogs.com/leoyo/archive/2008/07/08/1238179.html
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群