BookmarkSubscribeRSS Feed
shankar_kumar
Calcite | Level 5
Hi Everyone

I am working on SAS Enterprise Guide.

As part of an automation work, I need to move some files from one folder to another folder.

SAS step used is:

options noxwait;
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.

Appreciate your co-operation.

Thanks
Shankar
2 REPLIES 2
Patrick
Opal | Level 21
Yep. That's the message you get with NOXCMD as I explained in one of your threads.

You have to ask your SAS Admin to change this to XCMD (in SAS Metadata on the logical Server under Advanced Options - I think...).

As long as NOXCMD is set there is no way to issue an OS command (shell escape).
darrylovia
Quartz | Level 8
Hello

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.

paper
http://analytics.ncsu.edu/sesug/2010/CC06.Putnam.pdf

SAS DOC
http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#accdll.htm

Enjoy
D

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 9759 views
  • 0 likes
  • 3 in conversation