copy paste command - help plz

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 358
Accepted Solution

copy paste command - help plz

Hello - please help to create "copy paste" command to execute on base sas 9.1

I have dataset created with variable name "file_name" which has two obs as shown below and wants to transfer both files to d:\woo\today_sales_file

dataset "A"

-----------------

file_name

20140804-123456-136_xyz_sale_file_20130101.txt

20140804-789101-567_abc_sale_file_20130101.txt

/*so file will be transferred like this*/

w:\data\in\20140804-123456-136_xyz_sale_file_20130101.txt d:\woo\today_sales_file

w:\data\in\20140804-789101-567_abc_sale_file_20130101.txt d:\woo\today_sales_file

Thank you...


Accepted Solutions
Solution
‎08-04-2014 06:46 PM
Super User
Posts: 11,343

Re: copy paste command - help plz

Instead of "copy and paste" use the SAS X command to issue an operating system command to copy the file.

X "copy w:\data\in\20140804-123456-136_xyz_sale_file_20130101.txt d:\woo\today_sales_file";

View solution in original post


All Replies
Solution
‎08-04-2014 06:46 PM
Super User
Posts: 11,343

Re: copy paste command - help plz

Instead of "copy and paste" use the SAS X command to issue an operating system command to copy the file.

X "copy w:\data\in\20140804-123456-136_xyz_sale_file_20130101.txt d:\woo\today_sales_file";

Super Contributor
Super Contributor
Posts: 358

Re: copy paste command - help plz

Thanks Ballardw - i dig deep and found it myself too using data _null_ to execute the copy command...after creating complete copy command as variable...

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 302 views
  • 0 likes
  • 2 in conversation