The forum will be down for maintenance at some point between Friday, September 25, 2020 at 5pm PDT and Sunday, September 27, 2020 at 11:59 PDT. Downtime is unknown but will be minimized.

Hi Sir,

Sybase Version 10

I need a function which needs to check the Directory is exist or not, and IF directory is not exist then we need to create the directory as well.

for Ex: the below script is from powerbuilder , equal script is needed for Sybase ASA Sql anywhere 10 version If Direcotyexists(ls_path)= False Then createdirectory(ls_path) End if sp_list_directory is not exist in sybase 10 it seems,correct me if i am wrong.

asked 05 Aug, 03:00

Sankar's gravatar image

accept rate: 0%

See this older FAQ, it deals with files in general. I guess with v10 you need to either use xp_cmdshell to run OS commands or use directory servers or use native functions that call OS APIs.

And there are probably more questions to this topic here...

(05 Aug, 03:52) Volker Barth

FWIW, as this question is still unanswered but similar to your other one, Breck's suggestion with xp_cmdshell would work here, too.

Here's a fitting OS Cmd to create a directory if it does not exist:

if not exist MyDirPath\. mkdir MyDirPath
permanent link

answered 11 Aug, 15:41

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 11 Aug, 15:42

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Aug, 03:00

question was seen: 94 times

last updated: 11 Aug, 15:42