How to test if a directory is empty

I have to test if a directory is empty or not.
How can I do it in a simple way?
Thank you

OdiFileWait use tool in a package
and 'Répertoire' and 'File name mask' property to check if a directory is empty or not.
There is another property "error if no file found". This can be used for a condition of KO to check if the directory is empty.

Tags: Business Intelligence

Similar Questions

  • How the test of a directory?

    How to test if a path to a directory instead of a file?

    File (path) .exists () new seems to return true in both cases.

    I found myself new file (path) .length =-1, because the directories seem to have a length of-1 as reported by the InDesign scripting DOM but I don't have really a lot of confidence that it is either portable or reliable in the future. Is there a better way?

    I guess I could try to create a file in the directory, but I don't like not to change the file system, and the script may not have permission to do so anyway. It's JavaScript, so it's hard to pay for a program (like ls - l) external, and that would really kludgey anyway.

    The slashes do not affect the. exists().

    the file manufacturer allegedly returns a Folder object in this case, but. constructor.name is always file.

    What is recommended? Thank you!

    If I understand the question, initially, all we have is a path string, and the decision is to know if create a file or folder from that object. Of course, then compares instanceof or constructor.name is questionable.

    A similar length is-1 observation would be the property of File.type, which is not defined for the records.

    Have a look in the JavaScript Tools Guide gives the best approach, though.

    "If the path refers to an existing folder:

    The file function returns a folder instead of a file object object.

    The new operator returns an object of a non-existent file with the same name file. »

    So - simply omit the 'new' and the types of tests, such as discussed.

    Dirk

  • How to test for the node XML empty?

    If (selectedImage.detail! = "")

    works with
    < picture detail = "" >
    < / image >

    but not

    < image >
    < detail > < / details >
    < / image >


    Hope that makes sense for a person, can't think really how to explain it better, I'm sure it's a fairly simple thing

    Quote:
    Posted by: ntsiii
    I did not understand. You try to search the nodes in detail where the text node is empty?
    Tracy

    Yes - for that I can't ignore explicitly their.

    Seems that all I had to do was if(!selectedImage.detail)

    Thanks for the reply - despite my not knowing how to phrase the question.

  • How to test moduleDeletionsPending, in the Simulator, I don't have the option to remove my application

    How to test the following?

    I want to test the functionality by using the method public void moduleDeletionsPending (String [] moduleNames). I had written logic that removes files from an SD card and it works when I call a menu inside my application item.

    However, it should only be run when I uninstall the application.

    In 9700 Simulator, if I select Options > Applications > [highlight the application] > [open the menu by pressing the Insert key on my keyboard] - I don't see the option to remove the application.

    I don't see the delete option for other applications, such as the Klondike card game.

    Should I set a property or the permissions of my app should be deleted in a simulator, so I can test the moduleDeletionsPending method?

    Thank you.

    You will need to 'install' the app in the BlackBerry smartphone Simulator so that your application appear in the list of applications.  You won't see here when you perform an execution/debug as, when you use the file, the option of loading or copy it into the directory of Simulator.

    The following link explains the different ways to install an application.

    How to deploy and distribute Applications

    http://supportforums.BlackBerry.com/T5/testing-and-deployment/how-to-deploy-and-distribute-Applicati...

    Note that you can install using a simulated so USB connection.  Click on the menu of the smartphone Simulator simulation BlackBerry and check USB cable connected.  Note that you can not the debugger attached when installing via a simulated USB connection.

  • How to recover a file photo after emptying the trash

    How to recover a file photo after emptying the trash on my Mac book pro?

    Thanks for your response

    Restore your time machine backup file.

  • How to change the default directory of the staff collective

    How do I change default directory of the collective of personal?

    OK so now I understand your talking about the contacts pane in the compose window. Here, I thought it was something to do with the address book. How it is difficult to click the desired address book, I really don't know. But the developers are working on a fix for the contact component to remember the address book selected between sessions, as it does now used session.

  • How to test the USB on Satellite Pro C870 speed?

    Hello

    Please I have connect WD item 10 B 8 USB drive to plug 750Go BLUE.
    Please how can test if USB3 uses full speed or lower connection USB2 bus?
    Brand of disk Crystal 3.03 said 31 MB/s reading and writing! (too low for USB3!)

    Thank you

    Hello

    You can use some freeware like tools
    -H2testw
    -Drive the speed Test 3.2
    I used the H2testw to SD card check and test USB memory stick and I was satisfied.

  • How to test a motherboard for fualts?

    Looking for means test a Toshiba Satellite L20/L25 for fualts. How to test to see if it has a graphics chip fail or its ram reading high because it sounds like the RAM fail if I go out and if I put it in it beeps once like it wants to start

    As far as I know that it can be tested using diagnostic tools special but these tools are not for public use and are designed by Toshiba to only service providers.

    Have you tested different RAM modules?

  • How to test the audio and the video on Android

    How to test audio and video on Android?

    How it is checked when installing Skype on Android?

    What I'm asking, is available in the desktop version to Tools-> Options-> Audio settings, and Tools-> Options-> video settings. And is checked during the installation of Skype for desktop PC as Configure Skype / check your audio and video files.

    (Of course I searched the whole Skype app and found no.) I have the echo service by my microphone is weak, I am lost.)

    Thank you.

    Sign in to your ID on Skype desktop and call your android phone to test

    It's something is broken, there is not that you can do, other than downgrading to an older version. There are also a couple of settings to activate the camera and photo qualityin settings in some versions.

  • How to check all existence directory in TestStand?

    How to check all existence directory in TestStand?

    Is there a function TestStand? Or another option without writing my own code in the external program (for example, LabVIEW or C)?

    Thanks in advance

    Try the Engine.FindPath method. BTW several times when you do file IO, depending on what you're doing exactly, you need to write a code module.

    CC

  • How to test profibus is set up correctly?

    I profibus card installed in a PC.

    the pc is not installed LabVIEW. only testStand.

    purpose of this PC is like test panel for the execution of the TestStand test scenarios and this PC will be connected to the IO.

    How can test the profibus if there is no installed Labview?

    The vendor of your device must provide you with the GSD file. Each peripheral support profibus usually come with a GSD file.

  • "NaN" - how to test in VBAI <>- BT?

    I use VBAI to measure the length of a line.

    I use LabVIEW as the custom interface.

    In VBAI, I use "Update of Inspection" to send the data of length to LV

    How can I check in vi, that this figure is "NaN? This will happen when the line is not found.

    I tried to use ' NaN/path/RefNum"of the LV, but it simply doesn't.

    Help please...

    I don't know how you test this. I tried it and it works fine. Make sure the update of Inspection stage has the flag to 'Run the VI after update of the indicators'.

    If she still doesn't for you, let me know and I can send you a simple example (if you need an example, let me know what version of the VBAI you are using).

    Thank you

    Brad

  • How to test if the pc is connected to the TCP/IP protocol?

    Hello

    I have a VI how should the data received from another PC, using a TCP/IP connection.

    My VI could connect, receive data, but if I lose the connection im not able to reconnect, because I do not know how to test if my pc is connected to the other.

    Thank you for your help,

    Best regards

    salim_mjs wrote:

    Hey,.

    I was checking for error 66, I think that it check if the connection has been closed in order to reconnect

    do you not think that the error 56 or 60 are better?

    with respect,

    56 is the time-out. This will depend on your remote service if this should be considered as error or ignored. If it is a server application, it should certainly be able to respond within the time limit. But if your host application is the server and the remote application is the client it is very common to receive a time-out error when querying the client if it has new data to send.

    Order the examples mentioned previously, they really give you a good idea on how TCP/IP network communication must all work, even if there is still a lot to improve to create a truly reliable connection. But start from there come back if you get into trouble.

    Rolf Kalbermatter

  • How to test the domain controller security policy works or not?

    How to test the domain controller security policy works or not?

    So far, I put a security policy in the domain controller security policy, however, I do not affect client computers joined to the domain controller. and so far, if I apply the domain security policy work.

    LiuAlex

    Server must wonder about the Technet site.  http://social.technet.Microsoft.com/forums/en-us/home

  • HOW can I FIND THE CARTRIDGES ARE EMPTY AND that it FAULT REPLACE HP printer fax C309 using windows 7

    HOW can I FIND THE CARTRIDGES ARE EMPTY AND that it FAULT REPLACE HP printer fax C309 using windows 7

    Hello

    Please use one of the following methods:

    http://support.HP.com/us-en/document/c00257147

    Kind regards.

Maybe you are looking for

  • Organize Photo Thumbnails

    Hello When I drag and drop a large number of videos of 'Photos' in a folder from external hard drive, thumbnails are everywhere. Sometimes with a lot of different files on each other. Is there a way to organize everything perfectly in one fell swoop.

  • The use of parental controls to block Youtube will also block Youtube links on other sites from loading?

    I'm trying to stop a child direct access to Youtube. My concern is that it must be able to watch Youtube links for the school.   The school has content on one of their pages. I understand adding youtube.com to blocked list prevents the child to have

  • wap610n - Hello issues services

    my connection with wap610n (latest firmware) is ok, but if use any security protocol, there seems to be some problems with services of discovery as Hello. for example, I can't use my Ipad Remote App to control Itunes, or I can't access a shared iTune

  • VGA to RCA?

    I bought a RCA cable in offline mode in the hope that I could connect my laptop to my tv VGA. The cable has a vga connection I plug it into my computer and the normal CAR taken at the other end. When I plug everything I'm not mount and report on tele

  • 2000 laptop... black screen after replacing the screen"

    I dropped the cell phone cracked screen, replaced the screen with a controlled with surgeons of the screen. Screen remains black, external monitor works. The brightness keys do not move the progress bar. All bars are gray. (assumes that the replaceme