05-09-2015 01:54 PM
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.
05-09-2015 03:43 PM
1. Obtain a list of files in the directory
1b. Filter based on criteria required - unspecified in question
2. Copy the file using the method specified here - byte by byte copying.
05-09-2015 05:10 PM
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?
05-11-2015 01:27 AM
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.
05-11-2015 04:21 AM
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.