As part of an automation work, I need to move some files from one folder to another folder.
SAS step used is:
x ‘move c:\temp\*.txt c:\newtemp’;
When I run this step, I get following error:
ERROR: Shell escape is not valid in this SAS session.
Since Enterprise Guide I work on provides a client interface to log in to SAS server located remotely, I found from internet that SAS administrator disables windows cmd commands to avoid their misuses.
Please suggest me ways to move files.
Note: while I want to move, I want to make sure the "date modified" values of files do not change.
I work exclusively in SAS Enterprise Guide and have had the same problem that you have. I solved mine by directly accessing the Windows DLL that contains the copy/move function by using the SASCBTL attribute table with the MODULE family of call routines and functions. Below is a link to a paper that I wrote for SESUG 2010 that describes how to do this.