How can i determine if a directory exist using plsql

i want to determine if a directory exist
e.g
directory in variable dir_source:= 'xc/folderName/SubFolder'
i want find how to determine if the above exist on my server using plsql
Edited by: kama021 on Jun 24, 2009 2:21 AM
i don't want to create a direcotry if it exist already so how do i do this
if the below directory exist then don't create how do this
'xc/folderName/SubFolder'
Edited by: kama021 on Jun 24, 2009 3:26 AM

What OS? The trick is to use a known special file that always exists in every folder. On Windows an example of this is NUL. It's the equivalent of /dev/null but exists in every directory automagically. That means you can do this:
SQL> create directory temp as 'C:\TEMP';
Directory created.
SQL> select dbms_lob.fileexists(bfilename('TEMP', 'NUL')) from dual;
DBMS_LOB.FILEEXISTS(BFILENAME('TEMP','NUL'))
                                           1
1 row selected.
SQL> create directory test as 'C:\NOTREAL';
Directory created.
SQL> select dbms_lob.fileexists(bfilename('TEST', 'NUL')) from dual;
DBMS_LOB.FILEEXISTS(BFILENAME('TEST','NUL'))
                                           0
1 row selected.

Similar Messages

  • I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    I have my personal music (not purchased from Itunes) stored in two locations, on my PC and on an external HD. How can I find out which directory itunes uses to access this music? I am using Itunes version 11.4.0.18. Thanks

    Many thanks JEM24 for your help.  Ive just spent the best part of six hundred pounds on a new Sony Rx100m2 compact camera, so I have no interest in the Ipods camera at all really. I doubt Ill be watching many videos on it as Im very lucky in that I have a good Android tablet. Its more as a stock music player that Ill be buying the Ipod for, if indeed I do end up buying one. I dont like the idea of paying the exorbitant amount added for more memory space that Apple along with most other companies charge. In fact I read an article on this very subject just yesterday in the tech section of Flipboard. It stated in the article that in the case of the Iphone  the actual cost of each additional  gigabyte of storage  to Apple et al is something in the order of 60p.. This is certainly not reflected in the price us the customer has to pay at the till.. Its for this reason primarily that Apple in particular, because their products do not allow adding expandable memory of your own in the form of cheap to buy cards, that nobody in their right mind buys the 64gig etc Iphones..I am aware that we are discussing my potential purchase of an Ipod Touch here but you see my point. Many thanks again though for helping me.

  • How can I determine the cipher bit strength used by MY os X?

    How can I determine the cipher bit strength used by MY OS X?  Using Lion now?

    CT:
    Not Filvault, but the regular cryptographic use as built into OS X.  For example 1Password uses the algorithm in the OS X's Linux.  How many bits (i.e. 50, 128, 256...) does it use and what algorithm (DES, AES...)
    Linc
    As per reply to CT?
    Like so:
    http://osxdaily.com/2012/01/30/encrypt-and-decrypt-files-with-openssl/
    What is the strength used?

  • How can I determine if PeopleSoft Queries are used in Crystal Reports

    One PeopleSoft user requested that we delete 118 Queries. How can we determine if any of these Queries are being used in Crystal Reports?

    >
    One PeopleSoft user requested that we delete 118 Queries.
    >
    Why? How would the user know, or even care, if the queries exist?
    It is not the concern of a user whether such queries exist or not. If your system has a security flaw that allows non-privileged users to executed those queries then you need to fix that flaw.
    Remove the privileges that the user has on those queries and then, for that user, the queries will not exist.
    >
    How can we determine if any of these Queries are being used in Crystal Reports?
    >
    You can't.
    How do you determine if an app has any Java code that uses the SCOTT.EMP table? You can't.

  • How can I determine which programs/files are using disc space?

    A question for the professionals:
    What program on my MacBook Pro can I run to determine which programs and files are taking up the percentage of disc space?  I am running at 72 gb, which is great, but I need to know what is using up the rest of it.  Thank you in advance to any helpful solutions.
    Matthew

    activity monitor for RAM (its already in your utilities folder) http://support.apple.com/kb/HT1342.  OmniDiscSweeper for hard drive http://www.omnigroup.com/products/omnidisksweeper/  (needs to be downloaded)

  • How can i determine what vectors have been used for TTLTRIG0?

    hi! I'm programing the application in vxworks OS.The application can obtain interrupt from TTLTRIG0-TTLTRIG8. Wish to receive your help! thank you very much!
    regard you!

    Hi Zhongzheng,
    I'm not quite sure what you mean by vectors. Are vectors specific to VXWorks? Are you trying to figure out which instrument is causing an interrupt or asserting the trigger? Are you trying to determine which trigger line has been asserted? Please clarify your question and provide more details, I'll try to find an answer for you.
    Regards,
    David Shatila
    Applications Engineer
    National Instruments

  • On a DHCP server with BOOTP enabled. How can I determine what addresses were assigned using BOOTP

    We are in the process of migrating our 2008 R2 DHCP servers to Server 2012.  We're doing this in order to configure DHCP failover to a remote site.  We can't do this if BOOTP is enabled on the scope.  Before I start disabling BOOTP on all
    of our scopes, I would like to find out what is using BOOTP.  Is there a way to search all scopes in the DHCP database to find all addresses assigned using BOOTP.  Powershell, netsh?

    Hi,
    Show BOOTP table:
    1. Open DHCP console, expand the DHCP server.
    2. Right click IPv4, and select Properties.
    3. Switch to General tab, select the checkbox Show the BOOTP tab folder.
    After saving the change, you will see BOOTP folder in the left column. Details information you may reference the link:
    http://technet.microsoft.com/en-us/library/cc781370(v=WS.10).aspx
    Best Regards,
    Eve Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Async tcp client and server. How can I determine that the client or the server is no longer available?

    Hello. I would like to write async tcp client and server. I wrote this code but a have a problem, when I call the disconnect method on client or stop method on server. I can't identify that the client or the server is no longer connected.
    I thought I will get an exception if the client or the server is not available but this is not happening.
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    How can I determine that the client or the server is no longer available?
    Server
    public class Server
    private readonly Dictionary<IPEndPoint, TcpClient> clients = new Dictionary<IPEndPoint, TcpClient>();
    private readonly List<CancellationTokenSource> cancellationTokens = new List<CancellationTokenSource>();
    private TcpListener tcpListener;
    private bool isStarted;
    public event Action<string> NewMessage;
    public async Task Start(int port)
    this.tcpListener = TcpListener.Create(port);
    this.tcpListener.Start();
    this.isStarted = true;
    while (this.isStarted)
    var tcpClient = await this.tcpListener.AcceptTcpClientAsync();
    var cts = new CancellationTokenSource();
    this.cancellationTokens.Add(cts);
    await Task.Factory.StartNew(() => this.Process(cts.Token, tcpClient), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
    public void Stop()
    this.isStarted = false;
    foreach (var cancellationTokenSource in this.cancellationTokens)
    cancellationTokenSource.Cancel();
    foreach (var tcpClient in this.clients.Values)
    tcpClient.GetStream().Close();
    tcpClient.Close();
    this.clients.Clear();
    public async Task SendMessage(string message, IPEndPoint endPoint)
    try
    var tcpClient = this.clients[endPoint];
    await this.Send(tcpClient.GetStream(), Encoding.ASCII.GetBytes(message));
    catch (Exception exception)
    private async Task Process(CancellationToken cancellationToken, TcpClient tcpClient)
    try
    var stream = tcpClient.GetStream();
    this.clients.Add((IPEndPoint)tcpClient.Client.RemoteEndPoint, tcpClient);
    while (!cancellationToken.IsCancellationRequested)
    var data = await this.Receive(stream);
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    private async Task Send(NetworkStream stream, byte[] buf)
    await stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
    await stream.WriteAsync(buf, 0, buf.Length);
    private async Task<byte[]> Receive(NetworkStream stream)
    var lengthBytes = new byte[4];
    await stream.ReadAsync(lengthBytes, 0, 4);
    var length = BitConverter.ToInt32(lengthBytes, 0);
    var buf = new byte[length];
    await stream.ReadAsync(buf, 0, buf.Length);
    return buf;
    Client
    public class Client
    private TcpClient tcpClient;
    private NetworkStream stream;
    public event Action<string> NewMessage;
    public async void Connect(string host, int port)
    try
    this.tcpClient = new TcpClient();
    await this.tcpClient.ConnectAsync(host, port);
    this.stream = this.tcpClient.GetStream();
    this.Process();
    catch (Exception exception)
    public void Disconnect()
    try
    this.stream.Close();
    this.tcpClient.Close();
    catch (Exception exception)
    public async void SendMessage(string message)
    try
    await this.Send(Encoding.ASCII.GetBytes(message));
    catch (Exception exception)
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    private async Task Send(byte[] buf)
    await this.stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
    await this.stream.WriteAsync(buf, 0, buf.Length);
    private async Task<byte[]> Receive()
    var lengthBytes = new byte[4];
    await this.stream.ReadAsync(lengthBytes, 0, 4);
    var length = BitConverter.ToInt32(lengthBytes, 0);
    var buf = new byte[length];
    await this.stream.ReadAsync(buf, 0, buf.Length);
    return buf;

    Hi,
    Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
    According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    Console.WriteLine(exception.Message);
    Unable to read data from the transport connection: An existing   connection was forcibly closed by the remote host.
    By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How can I determine how many events are in my calendars?

    The web version of my iCloud Calendar and subsequently also my Calendar.app did show recently various malfunctions and error messages that were inconsistant. Also, Calendar.app crashed when I was editing events. Finally, Calendar.app did complain that my iCloud account would be out of quota, and did direct me to this KB article:
    http://support.apple.com/kb/HT4489
    I did not know about these quotas before which are not really high and quite limiting for use over longer periods of time. After checking them, I think that my real data are below these limits. However, there might be one exception:
    - Total number of calendars, events, and reminders: 25,000
    25,000 sounds a lot, but when you devide by 6 events per day (which is easily reached if you combine family and buisness, and maybe repeated events also count for each repetition at least after editing), one ends up at 4200 days which is not much more than 11 years. I am using Calendar with data since the year 2000 (for some time I used Palm Desktop that took over the (very) old Mac Calendar application and imported/moved the data when iCloud Calendar became available).
    My questions:
    - how can I determine the number of events in my calendars?
    - which events do count in which way for the quota limit?
    - what about events from shared calenders - do they count if owned by another account?
    - what about repeated events which are partially edited?
    Thanks in advance for any hint!

    Hi there
    I ran into the same problem last year. The solution I used is available here:
    http://forums.macrumors.com/showthread.php?t=1693875
    Apple don't seem keen to tell you you've reached your limit and if you think that isn't helpful tough luck. I reached due to duplicate events being created. I didn't know what had happened until I eqnuired further on the above forum. Someone needs to create an event counter application. Perhaps they have. Would need to do a search.
    However I've now reached the limit again and I'm not sure why, cue more faffing around being required. That's one of the problems of using a Mac computer with an Android phone.
    As for the limit, it exists and if you dont like it you need to change the way you work not Apple. That's the impression I get. Alternatively use something else that has more generious limts. I don't know what that would be. I did consider moving my calendars to Google but it would have meant certain functionality would not work in BusyCal, the third part calendar application I use on my Mac computer.

  • How can I determine which profile Firefox 5 is currently using?

    How can I determine which profile Firefox 5 is currently using?

    in address bar type:
    '''''about:cache'''''
    and look at '''''Offline cache device -> Cache Directory'''''

  • HT201250 How can I determine which Time Machine backups can be deleted to free space on my backup device?

    Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month, and weekly backups.
    But are they all incremental or full backups?
    How can I determine which can be deleted to free space on my backup device?
    Thanks.

    Thanks.
    So, if TimeMachine only makes one full backup the first time a backup is taken, and then automatically removes backups as space is needed, is there a danger that there can come a point where no single restore point exists?
    I find Apple's lack of detail around this topic disappointing. It's such an important thing.
    I guess TimeMachine doesn't work quite how I want it too. Seems to be true of so many Apple products!

  • How can I determine the type of video out connector I need?

    Howdy,
    I have a white macbook purchased Jun/2008. I want to connect to a TV but don't know what adapter I need. How can I determine the type of video out jack my macbook has?
    System Profiler says the model identifier is "MacBook 4,1". Under Graphics/Displays the only thing it says about the "Display Connector" is that no display is connected. Too bad it doesn't tell me what type of connector it is. If I knew the name of the connector I'd probably be home free. But it seems like every macbook model has a different video connector (since the state of the art has advanced over the years) and I haven't been able to keep up with the names.
    Now, I have a 6" long adapter that will convert this connector to VGA. And searching the Apple store for VGA adapters, the existence of mine says my connector is might be one of "Mini DisplayPort", "Apple Mini DVI", "Apple DVI", or "Apple Micro-DVI". But then there is also the connector at
    http://store.apple.com/us/product/M8639G/A?mco=MTY3ODQ5OTY
    and that looks like the one I have. But unlike the other adapters, this one is just called a "VGA Display Adapter". Does the connector have a name? How can I find adapters that have that same connector?
    I know I could use the adapter I have, plus a VGA to VGA cable, to hook up to a TV. But the quality of the VGA signal is poor in the digital world. My goal is to hook up to the TV via HDMI. Is this even possible? By which I mean, will my macbook generate the signals necessary to be able to be converted to HDMI?
    Thanks for any help,
    Zebulon T

    Thanks, Ded,
    You're right, the cable that I have won't work. I't from my previous, 2004 iBook. This is pretty embarrassing... I looked at the cable but didn't bother to try plugging it in.
    Looking at the close-up picture of the Mini-DVI to VGA adapter, that does look like the right connector. So I have Mini-DVI, and the other apter you pointed to can convert this to DVI. I'll take a look to see what makes the most sense, connector wise, downstream from that.
    Thanks very much.
    Zeb T

  • When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Websites remembering you and automatically log you in is stored in a cookie.
    *Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    *Tools > Options > Privacy > Cookies: Exceptions
    In case you are using "Clear history when Firefox closes":
    *do not clear Cookies
    *do not clear Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins.

  • How can I determine what computers are home sharing??

    How can I determine what computers are home sharing??

    Launch iTunes on the computers you're interested in. Check in the "Advanced" menu.
    If "Turn on Home Sharing" is listed as an option, the iTunes library that you have open is not Home Sharing.
    If "Turn off Home Sharing ([accountname]) is listed as an option, the iTunes library that you have open is Home Sharing.

Maybe you are looking for

  • How can I get a preloader to launch a main (external) swf file, and have the main file remove the preloader once it's fully loaded?

    Using Flash MX, ActionScript 2: I’ve been struggling for several weeks, trying to get a preloader to work on a large (~80 MB) photo portfolio file (using the method where the preloader is on frame 1 of the file, and when loading is completed, it jump

  • SUBMIT works in one server and fails in another!!

    Dear All, I have the following SUBMIT statement that works in one server perfectly and fails in another with SY-SUBRC 8 [ Error in job scheduling (JOB_SUBMIT) ].   SUBMIT riaufk20 EXPORTING LIST TO MEMORY AND RETURN WITH SELECTION-TABLE seltab. Below

  • I can't get iTunes to open on my computer

    I got a new computer recently and i need to transfer my itunes (music,apps,pics,etc) but my old computer is very buggy and wont open itunes at all. Ive tried restarting and plugging my ipod into it but nothings worked. PLEASE HELP ME!!!!!!!!!! thanks

  • Are Time Machine newly excluded backups deleted?

    If you have an external disk included in your Time Machine backup, and then exclude that disk from Time Machine in system prefs, are the old backups of that disk erased/no longer included in the Time Machine backup?

  • Split Brain Scenario

    Hello, Whilst testing Dataguard with FSFO, I seem to have managed to achieve a split brain situation where 2 databases in the Data Guard configuration were considered as primary databases and both were available to receive client connections. I dont