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

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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