As Richard said, you need to make sure that XCMD is permitted (-allowxcmd) in your workspace server definition. If you make a change in SAS Management Console to enable this, you usually have to restart the object spawner to have it take effect.
You might try:
X 'dir';
Just to make sure that X commands are working.
Once you've established that X commands work, there are these additional considerations:
- does the user identity (account) that launched the SAS session have the appropriate permissions on the server machine to delete these files?
- if you are trying to access network resources (using the UNC \\server notation), Windows might get in your way if delegation is not enabled. By default, the server machine cannot pass your identity along to another server machine on the network to accomplish some work on your behalf; this needs to be enabled via an ActiveDirectory setting by an admin. See
http://support.sas.com/documentation/cdl/en/bisecag/61133/HTML/default/a003181427.htm.
Chris