Monitoring and changing place....

Hi, I want to do an application that will monitor a directory for new files, read the file and then change the file to an other directory.
I need this so I can make a log file, but I don't know how to monitor a directory to see if there's new files. Can anybody help me?
Thanks

hi,
there is no mechanism in Java to monitor a directory such as event listeners do it with objects. What you can do is the following:
Create a new thread that continually checks the files in the specified directory (using File.listFiles()) and determines new files. It should run periodically with sleeping intervals (Thread.sleep(int)) so that the operating system isn't blocked so much by the file operations.
best regards, Michael

Similar Messages

  • Keyframes appear almos ramdomly and change place

    Can anyone help me with these problems concerning audio editing?  I’m working with Premiere Pro CS6:
    keyframes appear whenever I click on the volume level rubber band either with the pen tool or the selection tool, holding or not the command key. It takes a while to undo them and they keep on “growing” like mushrooms.
    keyframes tend to change place and move next to the time indicator when I stop it.

    Check to see if the Write Keyframes button is depressed on the Audio Clip Mixer for at least one channel. If so, and if you don't want adjustments to audio effects to be keyframed, then deselecting the Write Keyframe option for all channels will do the trick.
    This behavior is entirely by design with "intrinsic effects" that are native to all clips, like volume and pan/balance. Whether the ACM's Write Keyframes setting should also affect audio effects that you apply to a clip, like Multiband Compressor, was a topic of much debate internally. To put it another way, the current behavior is by design, but with dissenting opinions.
    If you would prefer to have applied (non-intrinsic) effects operate independently of the Write Keyframes settings, please make your voice heard: https://www.adobe.com/go/wish/https://www.adobe.com/go/wish/
    [For the record, I was not involved in the debate and honestly do not have a firm opinion about the ideal behavior.]

  • Firefox 4 RC2 seems to have a problem correctly displaying. Small to large black boxes appear all over it, and change places when I move my mouse. Sometimes the whole screen goes black. Never had that problem before.

    ''locking as a duplicate - https://support.mozilla.com/en-US/questions/794271''
    Here is my computer information.
    Operating System
    MS Windows 7 Home Premium 64-bit SP1
    CPU
    Intel Core i7 720QM @ 1.60GHz 43 °C
    Clarksfield 45nm Technology
    RAM
    4.0GB Dual-Channel DDR3 @ 532MHz (7-7-7-20)
    Motherboard
    Alienware (CPU 1)
    Graphics
    Generic PnP Monitor (1440x900@60Hz)
    ATI Mobility Radeon HD 5870
    Hard Drives
    244GB Seagate ST9250410AS (SATA) 34 °C
    Optical Drives
    HL-DT-ST DVD+-RW GA31N
    Audio
    ATI High Definition Audio Device
    I have never had this problem with the current version of Firefox. I uninstalled the RC2, because I couldn't see what was going on half the time.

    It does work, and fixes other weirdness like issues on facebook. '''However '''you need to restart Firefox for it to take effect as simply reloading a page after changing the setting made no effect.

  • When I connect a second monitor and change the solution so 1920*1080 the format ist 4:3 not 16:9

    I connected a second display via mini display port to VGA adapter.
    it works good, but when i change the solution to 1920 *1080 its only 4:3 not 16:9.

    Hi William
    In iDVD selct file - new.  From the dropdown menu name your project, enter where you want to save it, select aspect ratio 16:9, save.
    The templates you choose could be 14:9 or 4:3.  If you select a 4:9 for a 16:9 project you'll be prompted by asking if you want to change or keep. Make sure to keep original aspect ratio.
    You should be able to  setup a 1pm, 3pm, 5pm menu in iDVD provided you exported the QT file with chapter markers. The chapter markers should be at these times.  Don't set the marker right at the start or end of a frame.
    Here's a tutorial on how to set CM in FCPX 10.0.6
    http://www.larryjordan.biz/fcp-x-create-chapter-markers/
    Carl
    Edited by Carl
    Tom is right, iDVD is old software, but it still has utility. I would defer to Tom's advice as he is recognized on this forum as a professional author and prolific contributor to all things FCP (X). I have a couple of his books and they are an excellent source to learn from.

  • How do i run an external monitor with my macbook and change settings so that when i close the lid the signal to the monitor is not lost and i can continue using the mac with a mouse and a wireless keyboard?

    How do i run an external monitor with my macbook and change settings so that when i close the lid the signal to the monitor is not lost and i can continue using the mac with a mouse and a wireless keyboard?

    No, nothing will prevent the computer from going to sleep when you close its display except third-party hacks that are designed to do exactly that. I strongly advise against using any of those, as they may interfere with successful entry into clamshell mode (and they carry other downside risks as well). Just wait until the computer is asleep (with its sleep light pulsing), then press any key on the keyboard. It sounds as though your setup is working as it's designed to do.

  • I changed my appleID but iCloud is still using the old one and no place to change it.  How do I get iCloud to update to the new ID?

    I changed my appleID but iCloud is still using the old one and no place to change it.  How do I get iCloud to update to the new ID?

    You have to sign out completely and then sign back in.
    On a Mac, System Preferences>iCloud and click 'Sign out'.
    On an iOS device, Settings>iCloud and click 'Delete account' (this will not delete the account from the server).
    Your synced data will disappear from your devices when you sign out, but reappear when you sign back in (give it time).

  • Is there a method in labviewto dynamically save and change the monitor resolution under program control?

    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?

    vaidehi_joshi wrote:
    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?
    Have you already done this manually?  I've seen Labview scale front panels very strangely when changing resolutions...
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Why did in the right-click menu the "open in a new tab" and the "open in a new window" -buttons change places? And can you change it back?

    With the Firefox 4 RC, the "open in a new tab" and the "open in a new window" -buttons have changed places. It's quite annoying because I normally do it without even looking at it, but now it always opens in a new window instead of a new tab. Is it possible to change it back? Maybe in your own settings?

    You can use the menu editor extension to rearrange menu items - https://addons.mozilla.org/firefox/addon/menu-editor

  • I use a macbook pro retina. before i upgraded to maverick my windows stayed the way i put them. now after upgrade i have to resize every time i change the window. i use a 32in. monitor and use it full screen.

    I use a macbook pro retina.  I use a 32 in. monitor and use it full screen. I size the screen manually.  Since i upgraded to maverick, I have to resize the screen each time I change windows.Before the upgrade the screen stayed where I put it.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click  Log in.
    *Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode. Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • How I can change ipad mini mobile number I initially requested and to place the wrong number

    how I can change ipad mini mobile number I initially requested and to place the wrong number

    If you're refering to your uphone number thats set up to be used with imessage on your ipad, then that is associated with your apple id and has to be changed there first.
    My Apple ID
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Then on your ipad, sign out of messages. Go to settings/messages/tap on send and receive/tap on apple id/sign out
    Then sign out of messages on phone and then back in.
    Then sign into messages on ipad again, number should appear
    http://support.apple.com/kb/HT5538

  • Ever since moving to OS 10.9.x my MacBook Pro has operated slower than before the change. Today I accessed the "monitor" and there scrolling up on the screen was this: "2/18/14 6:38:56.524 PM Wormhole[267]: pathToFramework: /Users/jbrad723/Library/Wormhol

    Ever since moving to OS 10.9.x my MacBook Pro has operated slower than before the change. Today I accessed the "monitor" and there scrolling up on the screen was this:
    "2/18/14 6:38:56.524 PM Wormhole[267]: pathToFramework: /Users/jbrad723/Library/Wormhol
    2/18/14 6:38:56.524 PM Wormhole[267]: pathToFramework: /Users/jbrad723/Library/Wormhole/Wormhole.app/Contents/Resources/GoBridgeDemon. app/Contents/Frameworks/OTiTransfer.framework
    2/18/14 6:38:56.527 PM Wormhole[267]: updateState: 5
    2/18/14 6:38:57.525 PM Wormhole[267]: pathToDemonBundle:/Users/jbrad723/Library/Wormhole/Wormhole.app/Contents/Resour ces/GoBridgeDemon.app
    2/18/14 6:38:57.525 PM Wormhole[267]: pathToFramework: /Users/jbrad723/Library/Wormhole/Wormhole.app/Contents/Resources/GoBridgeDemon. app/Contents/Frameworks/OTiTransfer.framework"
    What is this?

    Looks like remote access software.
    http://wormholeremote.com

  • HFM QTD and HYTD have changed place

    QTD and HYTD have changed place - how to fix?

    Hi,
    Could you please be more specific.
    Thanks
    Amith

  • Camera problem: photo bar changed place and automatically rotates horizontal

    Hi everybody,
    I've searched the forum but I didn't find a similiar topic that describes my problem...
    After the update for Xperia 2.3.3 I'm having troubles with my camera.
    I CAN take photo's and video's but as soon as I've made a photo the miniature of it moves into the photo bar that was normally at the BOTTOM of my screen but is now automatically moved to the LEFT of my screen everytime I open the camera app.
    When I tap one of the miniatures to view my photo's, the photo is really small. Before the update I pressed the photo and was able to view it 'full screen' as the real image size.
    It's like the screen turnes automatically to vertical and so are the settings and share options etc. Turning the phone vertical doesn't switch it back either.
    I've tried to change the settings of the photo's from 'standing' to 'portrait' and changing the scenes and even turned off the 'turn the screen automatically' setting but it doesn't help.
    Does anyone experience this bug too and is there a fix? I really like making pictures with my Xperia but this is really frustrating.
    Thanks in advance!
    Greets from the Netherlands,
    Xanne

    Hello gwhisperererz,
    Thanks for looking at my problem. I have tried to reset the settings but it didn't change.
    I have made two photo's of what my camera menu looks like. Maybe this will explain the problem better, or is this just what the camera menu should look like after the new update? Before the update I could view my photo's at the BOTTOM of the screen instead of at the LEFT of the screen. And when I pressed a photo to view it, it would come up standing instead of vertical like in the picture.
    Thanks for your help!
    Xanne

  • Word document is changing place on desktop after save

    Hi!
    I have more word documents ( .doc ) on my desktop. If i open it, and do some changes, and after saving and closing it, the file changes place on the desktop. If my file was placed on the the right side at
    the desktop, after editing it, it will be moved to the left side. It will always move to the left side. I also noticed that this problem only occurs if my word file is saved as .doc. If i save my file as .docx, then it's fine. I have Windows 7 Professional
    32 bit installed.
    Can someone tell me, how to fix this?
    Thanks,
    kampi

    Hi Luke,
    Yes, i have a wide screen monitor ( Dell 2009W ) with a resoulotion of 1680x1050. However this happens also on a laptop ( Dell Latitude E6510 ) with a resulotion of 1600x900, so i don't think that the resulotion would be the problem. UAC is turned off.
    I tried the clean boot method what you said. I have turned off everything, but the problem was still persist, so i think this could be some problem with word, because if i edit and save a .doc file, then a .tmp file will be created on the place of my original
    file, and in the meantime the original file will moved to another location. It is interesting that on Windows XP this problem doesn't occured, not even a tmp file will be created and the .doc file stays on it position.
    Unfortunetly the second method what you mentioned is not a solution, because then every time a user opens a .doc file, then he/she has to restore his/her icons.
    kampi

  • How to resize and change the resolution of a batch of photos using Automator

    I searched for a long time tonight looking for the answer to this (seemingly) simple question:
    How do I use Automator to scale and change the resolution of a batch of images?
    It was not so simple.
    Links to this question:
    https://discussions.apple.com/message/12341246#12341246
    https://discussions.apple.com/message/12342026#12342026
    https://discussions.apple.com/message/5785047#5785047
    https://discussions.apple.com/message/1173358#1173358
    https://discussions.apple.com/message/5641853#5641853
    https://discussions.apple.com/message/3207516#3207516
    These are just the links on this site - I found them all over the place at MacRumors, Apple Tips, Mac Help, etc.
    You can actually manage this in Automator.
    Here are the steps that worked for me:
    Create an Automator APPLICATION - not a workflow (this is due to the way that I'm batch converting images - workflows might be ok for some cases)
    Step 1 is Copy Finder Items
    My flow inserts an SD card, opens the DCIM folder that my Nikon creates, selecting the images that I click (command + click to multi-select) and once I have the photos highlighted, I drag them onto this Automator App we're creating.
    <==  You'll have this guy soon!
    As a result - I want to copy the originals to my computer as step 1.  I don't touch the originals on the SD card (and cards are cheap so I tend to leave them on the cards as well)
    Step 2 is the Scale Images action - you can search the library for this and find it quickly.  For my part, I found that scaling images to about 38.8 percent of their size on the SD card is good for uploading to a blog.  Change this value to whatever you wish.
    Step 3 is Run Shell Script - and here is where we marry the brilliance found at this link with our script.If you have a hard time reading the text in the image, it is as follows:
    #bin/bash
    for f in "$@"
    do
         /usr/bin/sips -s dpiHeight 72.0 -s dpiWidth 72.0 $f
    done
    Save this application (I named mine "Format Photos")
    Place the application inside the target folder where you want the images to end up.  I do this because when I have the SD card window open, I can also open my "Photos" window and see my App sitting there.  I select my images as I mentioned and drag them on top of this app.  The app copies the originals and the conversions into the folder.
    NOTES: When you open a converted pic in Preview, you will see Resolution = 300 dpi if you go to Tools --> Adjust Size...  This reading is explained by another brilliant discussion as sips only touches the JFIF properties inside the file's MetaData.  However, if you look at the bottom of the Adjust Size... window, you'll see the image size is probably around 500 kb (give or take depending on the original).  My goal was to get the images down from the 3.0 MB I shoot at to around 500 kb.  Therefore even though the MetaData still thinks that it is 300 DPI according to Preview, it has been changed to 72 (open it in some other applications mentioned at the links and you'll find different readings - it all depends on what the application reads from the Meta).
    This does not rename the files, so you'll get DSC_1000.jpg and DSC_1000 copy.jpg in all likelihood.  If that annoys you, add a step into the Automator Application that renames the file after the "Run Shell Script" action has run, and you can have each file renamed according to some convention that you like.
    This took a heck of a lot longer than I expected - so I decided to put in the effort to share this with the community and save others the hassle. 

    PPI is pixels per inch of the image.  It is difficult to increase resolution as you are trying to add data that is not there.
    But for printing purposes what you want is dpi or dots per inch.
    The image processor either accessed from Bridge (tools/photoshp) or PS is a good way to change a batch of images.

Maybe you are looking for