Trigger an application on placing a file in a directory

Hi All,
Is there a way of triggering an application when a file is placed in a directory. I don't want to use the timer. Can anyone help me on this?
I don't know whether this question belongs to this forum or not... But, thought this is a better match from the name of the forums...
Thanks.

There is no API in Java that triggers an event when a file is added to a directory, so yes I believe you would need to use a Timer to scan the directory for changes.
You might be able to use JNI.
I used "directory event" to search this forum and found a couple of posting that seem to confirm this.

Similar Messages

  • Problem in Placing the file in  Archive directory

    Hi,
    I am trying to read a file and after processing , I want to archive and place in other directory. Though i am able to read and insert the data succesfully into database but not able to place in 'Archive' Directory.
    What might be the reason any idea???
    I heard there is a bug in 10.1.3.3.0 version... Is this true???
    Any help in this regard would be appreciated.
    Thanks,
    Pallavi
    Message was edited by:
    user614169
    Message was edited by:
    user614169

    I don't think there is a bug related to this in 10.1.3.3
    I am using SOA and JDeveloper 10.1.3.3 and its working fine
    Are u checking the archive option in file adapter?( Check wsdl for entry)
    Also are you giving the physical location or logical one?
    try with physical path if u are not doing it already.
    And also, i don't think files get archived after processing, they get archived at the same time the file adapter is in action.
    Regards
    Ketan

  • Problem during remove file .nfs into directory

    Hi,
    I've an java application that remove all file present into directory.
    The code are follow:
              String messaggioErrore="";
              if (!"".equals(archivio.getPathHD1())){
              File dirArchivio = archivio.percorso(Documento.SORGENTE_HD1);
              boolean esiste = dirArchivio.exists();
         if (esiste){
              boolean cancellabile = dirArchivio.canWrite();
              if (cancellabile){
              FileUtils.deleteDirectory(dirArchivio);
              boolean esisteAncora = dirArchivio.exists();
              if (esisteAncora){
              //errore --> problemi durante la cancellazione della directory dell'archivio
              messaggioErrore += "Cancellazione incompleta della directory " + archivio.getPathHD1();
              if (log.isDebugEnabled()) {
                   log.debug("Cancellazione incompleta della directory " + archivio.getPathHD1());
              else {
                   if (log.isDebugEnabled()) {
                        log.debug("L'archivio " + archivio.getIdarchivio() + " � stato eliminato dal file system.");
              else{
              //errore --> problemi durante la cancellazione della directory dell'archivio
                             messaggioErrore += "Impossibile cancellare la directory " + archivio.getPathHD1() + ", non si dispone del permesso per farlo";
                             if (log.isDebugEnabled()) {
                                  log.debug("Errore durante la cancellazione dell'archivio " + archivio.getIdarchivio() + " dal file system: non si hanno i permessi per cancellare la cartella contenente l'archivio. ");
         else{
                   //se non esiste significa che l'ho gi� eliminata
                   messaggioErrore += "L'archivio che si sta cercando di eliminare, non esite nel percorso: " + dirArchivio.getPath();
                   if (log.isDebugEnabled()){
                        log.debug("L'archivio che si sta cercando di eliminare, non esite nel percorso: " + dirArchivio.getPath());
    If into directory is present a file with extension .nfsXXXXX, FileUtils.deleteDirectory(dirArchivio) method not delete it but delete all other.
    Why?
    The code of method FileUtils.deleteDirectory(dirArchivio) is:
         public static void deleteDirectory(File file) {
              File[] files = file.listFiles();
              if(files != null){
                   //cancellazione del suo contenuto (ricorsivo)
                   for (int i = 0; i < files.length; i++) {
                        if (files.isDirectory())
                             deleteDirectory(files[i]);
                        else
                             files[i].delete();
              //cancellazione della directory stessa
              file.delete();
    My application run in a server with Redhat Enterprise Edition (not the last) and NFS protocol into NAS.
    The application run like user root in a server.

    I don't test the return value of delete method but I test the existences of the directory after delete directory operation.
    I want to know where is the problem before to change the code.
    x cottom: I'm not the server administrator and he want to run my application like user root, sigh.
    String messaggioErrore="";
    if (!"".equals(archivio.getPathHD1())){
    File dirArchivio = archivio.percorso(Documento.SORGENTE_HD1);
    boolean esiste = dirArchivio.exists();
    if (esiste){
    boolean cancellabile = dirArchivio.canWrite();
    if (cancellabile){
    FileUtils.deleteDirectory(dirArchivio);
    boolean esisteAncora = dirArchivio.exists();
    if (esisteAncora){
    //errore --> problemi durante la cancellazione della directory dell'archivio
    messaggioErrore += "Cancellazione incompleta della directory " + archivio.getPathHD1();
    if (log.isDebugEnabled()) {
    log.debug("Cancellazione incompleta della directory " + archivio.getPathHD1());
    else {
    if (log.isDebugEnabled()) {
    log.debug("L'archivio " + archivio.getIdarchivio() + " � stato eliminato dal file system.");
    else{
    //errore --> problemi durante la cancellazione della directory dell'archivio
    messaggioErrore += "Impossibile cancellare la directory " + archivio.getPathHD1() + ", non si dispone del permesso per farlo";
    if (log.isDebugEnabled()) {
    log.debug("Errore durante la cancellazione dell'archivio " + archivio.getIdarchivio() + " dal file system: non si hanno i permessi per cancellare la cartella contenente l'archivio. ");
    else{
    //se non esiste significa che l'ho gi� eliminata
    messaggioErrore += "L'archivio che si sta cercando di eliminare, non esite nel percorso: " + dirArchivio.getPath();
    if (log.isDebugEnabled()){
    log.debug("L'archivio che si sta cercando di eliminare, non esite nel percorso: " + dirArchivio.getPath());
    public static void deleteDirectory(File file) {
    File[] files = file.listFiles();
    if(files != null){
    //cancellazione del suo contenuto (ricorsivo)
    for (int i = 0; i < files.length; i++) {
    if (files.isDirectory())
    deleteDirectory(files);
    else
    files.delete();
    //cancellazione della directory stessa
    file.delete();
    }

  • How to call an application or a execute file in trigger?

    Hi,
    Can I call an application or a execute file in trigger?
    And how to do it?

    Hi Sarah,
    It would have been helpful to answer your question if your requirement was more detailed.
    Anyway, I assume that you want to know how to execute or run a sql script file from a trigger and if that is the case then you can use EXECUTE IMMEDIATE stmt in your trigger as follows-
    EXECUTE IMMEDIATE '@script_name';
    Regards,
    Murali Mohan

  • InDesign CS6 Crash on placing a file on to indesign document  , Crash Report is attached .

    Hi ,
    InDesign CS 6 is working fine in Mac mini and in MacBookPro it always crash on placing a file on to InDesign Document .
    Crash Report : http://pastebin.com/fUPiYd0c
    I have tried :
    1) uninstalling and reinstalling CS 6
    2) Using with different accounts including admin
    3)Troubleshooting as below mentioned  :
    a)  Trash preferences   (cmd-opt-shift-control while starting InDesign) "
    Either corrupt preferences (as above), or perhaps the permissions on the folders that contain the preferences are such that InDesign can't properly write to them. ( it sometimes does happen).
    b) Deleting the below folders: Before deleting the below directories/files please take a backup(just for safe).  Quit In Design and  try removing the  following directories/files (InDesign will re-create them at start up):
    ~/Library/Application Support/Adobe/Adobe InDesign CS5.5
    ~/Library/Caches/Adobe InDesign
    ~/Library/Caches/com.adobe.InDesign
    ~/Library/Preferences/Adobe InDesign
    ~/Library/Preferences/com.adobe.InDesign.plist
    ~/Library/Preferences/com.adobe.InDesign.plist.lockfile
    ~/Library/Saved Application State/com.adobe.InDesign.savedState
    Note:  The user Library directory is hidden under MacPro/Lion. You can get there in the Finder by holding down Option and then going to the Go menu (other ways are fine too).
    Please let me know if i am missing something .
    Thanks in advance ,

    Thanks Peter this definitely helps me , let me validate and come back to thanks again .

  • How to Trigger the process chain using Excel Files?

    Hi All,
    We have 9 excel files(4 master data attributes and text files and 1 transaction file).
    Everyday new records will be added into the excel sheets and we need to trigger all these files into the bw server through process chain automatically . As we have all these Excel files in the desktop.
    Please suggest how to achieve this task?
    Thanks
    Gowtham

    Hi,
    You cannot load flat files to BW automatically using process chains.
    You have to upload them to Apllication server and point your Infopackage to the directory path of the flat file in application server. then process chains can load it.
    How to guide for loading flat file to application server.
    Program to load CSV file from local desktop to Application server(For flat file Data extraction)
    -Sriram

  • Where should my application save its data files?

    Every operating system has a preferred default folder for saving data files generated by an application. On my Mac, it is users/<username>/library/application support/<application name>. On Windows, it is somewhere inside Documents and Files.
    Is there a way to determine this folder in Java?
    If at all possible I want my application to automatically load its data files at start up, and save them on exit, without prompting the user for a location. But the default folder appears to be the folder containing the jar, which is not the best choice for the platform.
    -Ron.

    There is a system property called user.home that will point you to the right folder. You'll still have to do a bit of platform specific code if you want to it correctly, though. Here's a method I use in my private toolbox (SysInfo is also private, but i guess you'll see what is does from the code):
         * Returns the appropriate working directory for storing application data. The result of this method is platform
         * dependant: On linux, it will return ~/applicationName, on windows, the working directory will be located in the
         * user's application data folder. For Mac OS systems, the working directory will be placed in the proper location
         * in "Library/Application Support".
         * <p/>
         * This method will also make sure that the working directory exists. When invoked, the directory and all required
         * subfolders will be created.
         * @param applicationName Name of the application, used to determine the working directory.
         * @return the appropriate working directory for storing application data.
    public static File getWorkingDirectory(final String applicationName) {
            final String userHome = System.getProperty("user.home", ".");
            final File workingDirectory;
            switch (SysInfo.getPlatform()) {
                case LINUX:
                case SOLARIS:
                    workingDirectory = new File(userHome, '.' + applicationName + '/');
                    break;
                case WINDOWS:
                    final String applicationData = System.getenv("APPDATA");
                    if (applicationData != null)
                        workingDirectory = new File(applicationData, "." + applicationName + '/');
                    else
                        workingDirectory = new File(userHome, '.' + applicationName + '/');
                    break;
                case MACOS:
                    workingDirectory = new File(userHome, "Library/Application Support/" + applicationName);
                    break;
                default:
                    return new File(".");
            if (!workingDirectory.exists())
                if (!workingDirectory.mkdirs())
                    throw new RuntimeException("The working directory could not be created: " + workingDirectory);
            return workingDirectory;
        }

  • Deploying a BC4/ADF Swing Application to a JAR File

    Hello,
    what do I exactly have to do, to deploy an ADF/Swing/Business Components-
    Project-Application to a JAR File. I can not start it outside the JDevloper IDE,
    but I created a deployment profile and deployed it to a JAR.
    There is always the error "Could not find the main class", when starting the
    JAR. In the JDeveloper IDE the application is running, and I also defined a "main class" there.
    Could anybody help me please?
    Greetings.

    You need the ADF runtime libraries in your classpath or as part of your JAR.
    Have a look at the command that JDeveloper is using to run your project (it is in the log window) and copy the classpath defenition provided there to the command line you use.

  • "Could not find the application that created this file" error when trying to combine files

    I am working with a user that is trying to combine a pdf & word doc (docx).  When they try to combine the files she gets the error:  "Could not find the application that created this file" & "Please select a file created by an application that resides on your computer".  The computer is running windows XP, with office 2010 SP1, & Adobe Acrobat Pro X.
    Per previous suggestions, I have already checked to see if Adobe PDFMaker is enabled as a Word plugin, and it is.
    Recentley the user was running Acrobat 6, and this error did not occur.  It is only after upgrading to Acrobat X that this is happening.  Any help with this issue would be appreciated.

    This can also be caused if the files are in a folder deep in the file system. For example C:/xxxxxxxxxxxxxxx/yyyyyyyyyyyyyyy/zzzzzzz/aaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbb /cccccccccccccccccccc/dddddddddddddddd/eeeeeeeeeeeeeeeeeeee/ffffffff/ggggggg/hhhhhhhhhhhhh hhhhhhhhhh/myPDF.pdf
    At some point Adobe PDFMaker cannot handle the path length (also, Windows can't handle the path length either eventually)
    Solution: move the files to a shorther path (perhaps the desktop) and try from there.
    I am filing a bug report with Adobe. A descriptive exception message should be thrown instead of "could not file the app.."

  • Could not find application that created this file error in Acrobat

    What is going on? I have an InDesign file that I want to convert by opening Acrobat and then converting to PDF. I am getting the error "Could not find application that created this file. [file name] Please select a file created by an application that resides on your computer."
    I most often use this functionality when I have multiple files of different origins and need to combine them into one document. Now I'm reading the forums and some are saying this functionality is no longer supported by Acrobat. Pardon my language, but WTF?!?! This is functionality that is commonly used by me and I can only assume other users. Now you have two Adobe products that won't communicate? If so, then all the hoopla stating how great the Adobe suite is should be edited. I have never seen these products take such a step backward!
    Sorry for the rant, but I find this to be ridiculous. What is the workaround, besides converting every document to PDF inside its own software and then combing the PDFs?

    InDesign uses a different method of making PDF files when you use the File->Export option in InDesign (even with Acrobat installed, it uses an internal copy of the PDF Library engine). As such, the two applications do not communicate directly with each other.
    Support for driving the PDF conversion process from within Acrobat has been removed from Acrobat X, beacuse with the new features in InDesign CS4+, Acrobat doesn't have access to the settings it needs to control things such as multimedia, spreads and transitions. ID CS5 divides PDFs into two concepts - "print" and "interactive", neither of which match the presets used by Distiller. Creating PDFs from InDesign files must therefore take place from within InDesign itself.

  • Page numbers from placed indd file not printing

    I've created a saddle-stitch booklet 1up in InDesign CS4. I've got auto page numbers on the master page, but when I place it in another InDesign document 2up for proofing, the page numbers are visible, but don't output either to an exported PDF or a PostScript file printed to be Distilled. Please advise.

    It's a bug. Anything on the master page of a placed INDD file just
    disappears...not good.
    Bob

  • Description Faulting Application Path:     C:\Program Files\Safari\Safari.exe  Problem signature Problem Event Name:     APPCRASH Application Name:     Safari.exe Application Version:     5.34.57.2 Application Timestamp:     4f982b5e Fault Module Name:   

    Description
    Faulting Application Path:    C:\Program Files\Safari\Safari.exe
    Problem signature
    Problem Event Name:    APPCRASH
    Application Name:    Safari.exe
    Application Version:    5.34.57.2
    Application Timestamp:    4f982b5e
    Fault Module Name:    KERNELBASE.dll
    Fault Module Version:    6.1.7601.18015
    Fault Module Timestamp:    50b83b16
    Exception Code:    80000003
    Exception Offset:    0003491e
    OS Version:    6.1.7601.2.1.0.256.1
    Locale ID:    1033
    Additional Information 1:    0a9e
    Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
    Additional Information 3:    0a9e
    Additional Information 4:    0a9e372d3b4ad19135b953a78882e789
    Extra information about the problem
    Bucket ID:    3349202712

    im having this problem to ive uninstalled and installed but this still comes up!!
    Problem signature:
      Problem Event Name:    BEX
      Application Name:    iTunes.exe
      Application Version:    10.7.0.21
      Application Timestamp:    504d85d9
      Fault Module Name:    StackHash_0a9e
      Fault Module Version:    0.0.0.0
      Fault Module Timestamp:    00000000
      Exception Offset:    00000000
      Exception Code:    c0000005
      Exception Data:    00000008
      OS Version:    6.1.7601.2.1.0.768.3
      Locale ID:    5129
      Additional Information 1:    0a9e
      Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:    0a9e
      Additional Information 4:    0a9e372d3b4ad19135b953a78882e789

  • Trouble creating a pdf converting Word doc ..."Could not find the application that created the file"

    Hello,
    I am working with Acrobat Pro 8 and am trying to create a pdf by converting a word doc. When I try that, I keep getting an error message, " Could not find the application that created this file...please select a file created by an application that resides on your computer." I can always convert a word into pdf first and then insert it into the pdf project that I am working on, however I have multiple files and I really would like to bypass that long step.
    I found another thread in this forum which talks about a simillar issue (http://forums.adobe.com/thread/429585).I tried the solution suggested there by Bill@vt regarding the print menu. I am not really sure if t have distiller installed, so I tried opening it in acrobat, but it failed. During the process, I got the follwing message "Check the Status column for a list of files that could not be printed".I do not have any clue how to check for AcroTray running in the background.
    I would really appreciate any help.
    Thanks!

    If Distiller failed to open, it sounds like you need to do a repair of your Acrobat installation. Have not heard that one before!

  • Applied 55% transparency to group of objects, but a placed .eps file is darker than things created natively in InDesign

    hey guys,
    I'm working on a math book and for some reason, my placed .eps files (which are used for equations) are appearing darker than the other items when set to 55% opacity. I've ensured that everything is set to 100% opacity before grouping, then grouped and set to 55%. My only thought is maybe the eps is RGB when the other things are CMYK...and if this is the case, I'm not sure how to test / fix it. Other than that idea, I have no clue as to where to begin in addressing this issue.
    The cheese is real with this example.
    You can see here that I'm applying the 55% opacity to the entire group. I've also ungrouped all of the objects, made sure they're at 100% opacity, then grouped and set to 55%.
    You can see here that the text is 100% black.
    Thanks!

    Sorry, I Googled around a bit, but not quite sure what you mean by distilling the PDF. I've exported the PDF as a "High Quality PDF", and the issue still persists there. Should I alter the PDF export options some?

  • Disappering cursor when placing multiple file in Indesign.

    When placing multiple file (jpeg, tiff's, pdf files,etc.) in a indesign document, my cursor disappears. If you can get to the desktop and click on it, it will come back.
    first started in Indesign CC 2014, Any fix for this?
    Thanks, Dennis

    Hi,
    This is an expected behavior, when you place an image in InDesign then it display the preview of the image however you this has no impact on the output unless the image placed is of low-resolution itself.
    In order to have good resolution of images, you may switch to View > Display Performance > High Quality.
    Thanks,
    Manish Sharma

Maybe you are looking for

  • I gave my old iphone to my granddaughter when I bought a new one. The phone is asking for a passcode for voicemail which I don't have? any ideas?

    I bought a new iPhone 5S and actually gave my iPhone 4S to my husband, who passed on my old iPhone 3S that he had been using to our granddaughter. So I am the original owner of the iPhone 3S. The iPhone 3S is asking our granddaughter for a Visual Voi

  • How to read large files(20-30 MB) using File/FTP adapters.

    Hi All, I am using JDev 10.1.3.3 and SOA 10.1.3.3. In my project some times i am getting files of size 20MB to 30MB. And the data of the file is in binary form. How can i read these type of files. I think batching is not possible because data is in b

  • What is exactly error CanWarnCommStuff?

    Well, I have the same message when i use low or high speed and i try to read a message from the microcontroller.I don´t know if the problem is because i connect something wrong(the port) or it can be another problem such as noise.When i trasmit a mes

  • PTP I/O error when using gphoto2

    Hi I'm trying to import pictures from my digital camera, but keep running my head into a wall. When I insert my camera, know automatically mounts the camera and I'm able to browse the pictures directly on the camera through nautilus. But when I try t

  • Create a line graph on EP 7.0

    We are trying to create a complex line graph in the portal which will pull data from SAP ISU. What is the best approach to developing this graph? Is SAP Chart Design suitable for creating a complex graph from scratch? Any help would be appreciate.