Desktop productivity for business analysts and programmers

How to move file folder-to-folder

Reply
Occasional Contributor
Posts: 10

How to move file folder-to-folder

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
Respected Advisor
Posts: 4,137

Re: How to move file folder-to-folder

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).
Frequent Contributor
Posts: 139

Re: How to move file folder-to-folder

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
Ask a Question
Discussion stats
  • 2 replies
  • 3435 views
  • 0 likes
  • 3 in conversation