Please, I have a text files( f1_g.txt, f2_m.txt, . fm_g.txt ..fn_y.txt) in the directory W1 and I want to copy some of them in the directory W2.
1- I want only to copy some of them (f1_g.txt, fm_g.txt....) from the directory W1 to the directory W2
2- I will make a copy from Unix to windows and from also windows to unix.
3- I do not want to use the x command( exemple : x cp f1 /w2). I want to use a sas program for all os.
Thank you.
1. Obtain a list of files in the directory
http://www.wuss.org/proceedings12/55.pdf
1b. Filter based on criteria required - unspecified in question
2. Copy the file using the method specified here - byte by byte copying.
Thank you for your answer
There is also the FCOPY function in SAS 9.4 at least. Not sure about earlier versions.
Generally you can't access Windows and Unix directories from the same computer, unless some arrangement has been made using something like Samba to mount the dissimilar type. Has this been done in your case?
Tom
Thank you for your message.
Is this been done in my case? non
To copy files between systems when there is no mapped-drive connection requires SAS (with SAS/CONNECT licensed) to be present on both systems.
If you don't have that, your only other option is using a file copy method like SFTP, which requires external commands with the X statement or system() function or call system() subroutine.
I would also suggest this sounds more like an FTP request. TBH if your not sure I would contact your IT support and have them setup file transfers/shared areas for you as you can run into all kinds of difficulties.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.