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 '20, 03:00

Sankar's gravatar image

Sankar
905510
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 '20, 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 '20, 15:41

Volker%20Barth's gravatar image

Volker Barth
39.5k355539810
accept rate: 34%

edited 11 Aug '20, 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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×2

question asked: 05 Aug '20, 03:00

question was seen: 625 times

last updated: 11 Aug '20, 15:42