BookmarkSubscribeRSS Feed
venka
Calcite | Level 5

I basically want to delete a folder 'test_fldr' on ftp server, and can not because folder is not empty.
tried rcmd='rmd /Test/test_fldr' (folder not empty)
tried rcmd='rmd -r /Test/test_fldr' (invalid file name, apparently -r is not recognized)

problem:
so decided to delete files in the folder first, as you see in following code
rcmd='dele *.*' debug does not work.

%macro del_temp;
filename del ftp 'x'   /* it doesn't work with empty ' ', so decided with x */
/* connect */
        host='111.111.111.111'
        user='abcd'
        pass='YYYYYYYYYYY'  
/* change directory */
        cd='/Test/test_fldr'
        rcmd='dele *.*' debug  /* struck here: extrct from log  "NOTE: <<< 550 *.*: The filename, directory name, or volume label syntax is incorrect. "
        ;
data _null_;
file del;
run;
%mend;

%del_temp


any help would be appreciated.

2 REPLIES 2
jakarman
Barite | Level 11

This is not a SAS issue. The ftp server is allowing some commands and there will be restrictions as of security on those files.

Try to find those and after that you could go on with the attempt using the SAS interfacing. (rcmd usage)

---->-- ja karman --<-----
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Concur with Jaap, also to add there is probably a very good reason why deleting things via ftp is not allowed!  Even local file deletion should be undertaken with extreme caution, and backups.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1528 views
  • 0 likes
  • 3 in conversation