cancel
Showing results for 
Search instead for 
Did you mean: 

I want to delete the folder IF its already exists in Sybase sql anywhere 10 version

0 Kudos
899

Hi Sir,

I want to delete the folder, IF its already exists in Sybase sql anywhere 10 version.

Accepted Solutions (0)

Answers (1)

Answers (1)

Breck_Carter
Participant
BEGIN
DECLARE @folder    LONG VARCHAR;
DECLARE @sql       LONG VARCHAR;
SET @folder = '"C:\\\\temp1"';
SET @sql = STRING ( 'xp_cmdshell ( '' IF EXIST ', @folder, ' RD /S /Q ', @folder, ''' )' );
EXECUTE IMMEDIATE @sql;
END;
0 Kudos

Thank you Sir