File movement and copying

Here where i work we use a software, whose files are stored on the server. But we also have a local copy of these files so that we can use the software when not in the office. Or when the server is down. The problem is, that many of my co workers are not very computer literate and the constant copying back and forth of files confuses them.
So I am trying to write an updater application. Basically all they would have to do is click a button, it would tell them whether there had been any important changes, and allow them to update by pressing a single other button.
I have the gui written, I have all the checks done, but i cannot figure out how to make Java take files in one place and copy them to another place. I would think this would be something that java is capable of. But as of this moment I am drawing a blank.
Any ideas?

Quick and dirty method is to use Runtime.exec() to execute the copy/move commands directly, though this is platform dependant.
Another way is to use InputStream and OutputStream to read the original file and write out the copy of the file.

Similar Messages

  • Why MacBook Storage is almost full even without files, movies and music??

    Anyone can help me with this???
    My MacBook Storage is almost full even without files, movies and music... why is it so???
    Thanks

    Hi Avelyn,
    Click on the Apple and then About this Mac>More Info. Click on the "Storage" tab to see what is using up all of your storage.
    That might help you to determine what you need to clean up.
    Cheers,
    GB

  • Basic File Move creates Copy

    Hello,
    There seems to be different behavior moving files.
    I just want to simply move them to a new space, not make an entire copy of them.
    Example,
    Moving files from desktop to a System/Document folder in the Finder.
    After the move, the files are always copied from Desktop vs a simple move.
    Is there a system preference that controls this by choice?
    Thanks,
    Phil
    All updates current regardless what the profile says below.

    Hello Barney,
    I just did an experiment having two Finder windows open.
    Moving a folder or file from one window to another makes a straight move w/o a copy.
    So the action of moving a Desktop file/folder to the Finder's system of folders automatically makes a copy for the new spot, and leaves original behind on Desktop.
    Not sure what's meant 'Where You cannot Delete", when the source is the same machine.
    Back in the day of using a PC, 6-years or so,
    there was always the option for a direct move, or copy.
    Thanks

  • Exporting catalog, making changes, then importing catalog does not update file movements and deletions

    I export part of my master catalog to a laptop.  I include the image files so I can edit the files at full res.  After managing and editing files I import the catalog back into the master catalog. When importing I check to replace metadata, develop settings and negative files. I have been running some tests to be sure all my work is being captured in the master catalog by this process.  I find that if I change develop settings or photo ratings this is detected when the file is imported and the data in the master catalog is updated properly.  The surprise is that if I delete files or move files among folders in the exported catalog these changes are not detected and these changes are not updated inthe master catalog.  It seems bizarre to me that such changes are not detected but I do not see how to get LR to recognize these changes and include them in the catalog update.  Without this capability I don't see how to use catalogs to move part of a catalog to another computer for edits and file management and then move back to the master catalog.

    There are various reasons why Lightroom works this way, but you'll need use pick flags to indicate photos to be deleted, and other metadata like colours or collections.

  • How do I protect File (read and copy only)

    I have created a photo file that I want my kids to be able to see and copy( make an imovie or slideshow with)but not write onto. This way as I update the file with more pictures I can copy the new items over easily without creating copies of pictures. The file size is currently 250GB and to re-write the entire folder each time takes 8 hours and it might only take minutes if it only has to write the new pics. My hope is to be able to drag the file onto their drive and then for the system to ask if I want to replace or ignore existing files and just write the new ones. I want to be the only one that has the capability to do this. Help

    If you control their Apple menu -> System Preferences -> Accounts to have parental controls, you can keep that file inside a read only folder that you create for them to access. That's true for nearly every version of Mac OS X.
    If you are able to boot into Mac OS 9 on any of your machines, you will have to setup those accounts to boot via Apple -> Control Panels -> Users and Groups to have read only folders.
    Secure your account with a password that no one can guess. Birthdays, names, foreign language words are not good passwords. A mixture of consonants, numbers, and symbols are best, and at a minimum 8 characters.

  • Help! Tried to cancel a file move and I think Im in trouble now...

    I tried to move (NOT copyt) a file from my mac to an external drive.
    The file was my iphoto file under my username. It is ENORMOUS; 350GB or so.
    The screen said it would take 14 hours to move. Having some other things to get done, after a minute or so I cancelled the move.
    The file now shows up as the same size within both my imac harddrive AND external hard drive.
    Thing is -- there are greyed out fileds on each.
    What does this mean? Am I in trouble?
    This all started because I wanted to roll back my iphoto files to last night. I tried to restore the file but timemachine said I do not have enough room on my computer to restore. So I figured I would move the current one to a different backup drive, restore last nights version from my time machine backup to my PC, and if all worked well just delete the version from my external.

    Select the text on the line below by dragging across it. Don't include the blank space at the end of the line. Only the text should be highlighted.
    ls -@Odeln
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V), then press the space bar.
    Now switch to the Finder and and select one of the grayed-out files on the internal drive. Drag it into the Terminal window. More text will be added to what you entered.
    Click in the Terminal window to activate it, then press return.
    Post any lines of output that appear below what you entered — the text, please, not a screenshot.

  • File Move and Rename Workflow and/or Script

    This seems to be a simple workflow to create, but it isn't working for me. I want a workflow and/or script that will move screenshots from my desktop and place them into a folder. Secondly, I want these images to be renamed from "Picture #" to "Screenshot #" when placed in the folder. I also want future images placed in this folder to be named sequentially without any problems. For instance, if Screenshot 1, Screenshot 2, and Screenshot 3 are present in the folder after the workflow is ran once, the next file should be named Screenshot 4 when the workflow is ran again. Can anyone offer any assistance in this matter? I would greatly appreciate it.

    If all you are doing is renaming and moving screenshots, then a regular AppleScript should do. Copy and paste the following script into the Script Editor and save as an application (uncheck the Startup Screen option). When it is first run it will ask for the destination folder, but after that it will use the same folder (until the script is recompiled, anyway).
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- rename and move screenshots from the desktop to the specified folder
    property ScreenshotFolder : (path to desktop) -- the default folder where the screenshots are created
    property ScreenshotExtension : ".png" -- the default screenshot extension
    property DestinationFolder : missing value -- the folder to move to
    on run
    if DestinationFolder is missing value then set DestinationFolder to (choose folder)
    tell application "Finder" to get files of ScreenshotFolder whose name begins with "Picture " -- get screenshots
    repeat with AnItem in the result -- do stuff with each item
    GetUniqueName for ("Screenshot" & ScreenshotExtension) from DestinationFolder
    tell application "Finder"
    set the name of AnItem to the result -- rename
    move (ScreenshotFolder as text) & the result to DestinationFolder -- move
    end tell
    end repeat
    end run
    to GetUniqueName for SomeName from SomeFolder
    check if SomeName exists in SomeFolder, creating a new unique name if needed
    parameters - SomeName [text]: a name.extension to check for
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique name
    set {Counter, Divider} to {"01", " "}
    set Here to -(offset of "." in ((reverse of text items of SomeName) as text)) - 1
    set TheName to text 1 thru Here of SomeName
    if Here is -1 then -- no extension
    set TheExtension to ""
    else
    set TheExtension to text (Here + 1) thru -1 of SomeName
    end if
    set NewName to TheName & Divider & Counter & TheExtension -- always add a suffix
    tell application "System Events" to tell (get name of items of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- increment suffix with leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    </pre>
    I added a leading zero to the number suffix so that the items sort properly. Note that if one of the renamed items is removed, a new screenshot will take it's place (the suffix starts at the beginning each time). If this isn't desired, the script can be tweaked to remember the last suffix number.
    HTH

  • Weblogic Admin Console Issue (Move and Copy buttons do not work)

    Hi everyone!
    We are using Weblogic portal 10.2. While using the administration console, some buttons are not working (exmple: copy and move buttons). When clicked, it gives the following errors:
    weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/PortalEARAdmin/xHttpReq'
    at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1816)
    at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1703)
    at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.getQueryParams(ServletRequestImpl.java:1656)
    at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java:756)
    at com.bea.jsptools.util.Utilities.isNewTreeMode(Utilities.java:1490)
    Truncated. see log file for complete stacktrace
    java.io.UnsupportedEncodingException: Unsupported Encoding UTF-8;charset:UTF-8
    at weblogic.servlet.internal.ServletRequestImpl.setCharacterEncoding(ServletRequestImpl.java:384)
    at weblogic.servlet.internal.ServletRequestImpl.initReader(ServletRequestImpl.java:1071)
    at weblogic.servlet.internal.ServletRequestImpl.access$1100(ServletRequestImpl.java:68)
    at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.mergePostParams(ServletRequestImpl.java:1778)
    at weblogic.servlet.internal.ServletRequestImpl$RequestParameters.parseQueryParams(ServletRequestImpl.java:1703)
    Truncated. see log file for complete stacktrace
    I hope you could share your thoughts on this.
    Thanks and have a nice day! :-)
    Warm regards,
    Rakie

    Are you using FireFox 3 to access the WLP Admin Console? If so, unfortunately, this is sounds like a known issue with FireFox 3. See http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/relnotes/relnotes.html#wp1210315 is the note for the portal admin console. Also, the release note is for WLP 10.3, but it will actually affect other releases as well.
    Try another browser, such as FireFox2 or IE6 or 7. If you want, you could initiate a support case, and ask to get a patch for bug 8159454.
    Greg

  • Limitations of Quicktime files (.mov and h.264) in Windows 64-bit.

    It was recently brought to my attention (yes, I'm late to the party) that any file that requires the Apple Quicktime process for playback (decoding) is severely limiting my otherwise powerful system.  The Quicktime process is a 32-bit process, which limits your editing functionality to 4GB of RAM—even if you have 32GB or more installed!
    I'm starting this new thread because the thread on which this was brought to my attention wasn't directly related to these issues.
    A few of my questions:  Why do so many cameras create .MOV or .MP4 files that require QuickTime components?  64-bit QuickTime X has aparently been available on the Mac for quite a while, yet I presume they won't allow anyone else to develop a 64-bit codec for Windows, so why hasn't someone sued Apple for monopoly, anti-trust, conflict-of-interest, etc?  And most importantly, in a world where DSLRs and off-board ProRes recorders abound, are Windows users really stuck with no option but to transcode the footage before heavy use in Premiere?  The Atomos recorders provide the option of using DNxHD, however, if I understand correctly, that codec still requires Quicktime (I've not tested this bit).  Is there a matrix available that shows camera / recorded format / requires quicktime / 8- or 10-bit / 4:2:0 or 4:2:2, etc? 
    To my fellow Windows 64-bit editors, how do you keep your sanity when editing "natively" in Premiere .MOV, .MP4, ProRes or DNxHD with the 4GB RAM limitation?  And what camera / off-board recorder do you prefer to avoid both a long transcoding session AND get right to work with native 64-bit codecs?
    Thanks in advance!
    === Systems === 
    Desktop              |   Laptop
    i7-2600K             |   i7-3630qm
    GTX460 (1GB)   |   GTX670mx (3GB)
             Windows 7 64-bit
             16GB RAM

    strypesinpost wrote:
    ...Have you read this yet?
    http://blogs.adobe.com/VideoRoad/2012/12/premiere-pro-and-quicktime-an d-nikon-oh-my.html
    Just now.  Yet, it seems to contradict my own findings.  The article says:  "In the case of Canon DSLR files, there’s something in the file header. Premiere Pro can recognize that the clips came from a Canon camera, and bypass QuickTime. This enables Premiere Pro to have smooth playback of DSLR files..."
    The test I conducted was between files from a Canon 7D in their original format vs. an AVI file I transcoded from those originals using GoPro Studio (formerly Cineform).  I load up a project and timeline with the original 7D files and then scrub the heck out of the timeline, back and forth.  I have Task Manager open in order to monitor my RAM usage.  I simply could not get past roughly 4GB.  Once I deleted all the original .MOV files from the project, retaining only the transcoded .AVIs, the project cut like butter.  The harder I scrubbed the timeline, the higher my RAM usage soared until it gradually, and gracefully came close to maxing out.  Lol.  Is there a better test I should run?
    The other test I ran was a project where I took a single talking head clip of approximately 5 minutes in length.  Nothing too taxing for the hard drive, and something that *should* be easy enough to play completely from RAM, once it played through once or twice.  I cut this clip and staggered a few tracks on top of eachother.  No effects, no transparency.  The cumulative effect was a cuts-only edit, but on the timeline my tracks looked like stairs, etc (perhaps the stairs weren't necessary).  The primary goal here was to watch how the system performed with a simple cuts-only project where Peremiere was repeatedly asked to access the same file from random locations in the file.   The .AVI version of this project, again, played flawlessly.  The .MOV version played even worse than I was expecting, since cuts-only 7D footage is usually not SO hard on the system (even if it is limited to 4GB RAM).  The .MOV project couldn't keep up.  Period.  As soon as the file needed to "jump back" on itself, the refresh rate became intolerable.
    So is the 7D an exception to the rule stated in that article?  It definitely seems to be limited to 4GB of RAM!  If it isn't, why am I seeing this?
    Also, is it possible that the footage from the 7D may not *REQUIRE* Quicktime to decode, but since Quicktime is found on my system, the 7D files default to using it anyway?
    I've not tested my GoPro footage so thoroughly, but I believe it's limited in the same way.  After a transcode to AVI in GoPro Studio, even 2.7K footage plays slick as a whistle.  Not so when I don't transcode.
    Further thoughts?

  • How to catch "Move" and "Copy" Events

    I want certain functions to be called whenever a user moves an existing PageItem on a Page, or when he copied a PageItem onto a Page.
    Which event should I be listening for, and to which object should the listener be attached?
    TIA,
    mlavie

    Harbs - you there?
    I can;t find any help for this elsewhere on the web - would really apprciate a response.
    mlavie

  • Read a file content and copy to another Diectory

    I wanted to do the following
    1-read a file from dir
    2- read the content of the file
    3- if the file contains zeros
    exit from this file and go to read next file
    else
    do some calculations
    i read a file and its contents and found zeros in the contents, so how can i say in the code to go to next file..
    any help please

    It depends on your code, but most likely using "return":
    //pseudo code
    while(moreFiles) {
      parseFile(file)
    void parseFile(File file) {
      while(moreContentToRead) {
        if(foundZero) {
          return;
    }

  • Blackbery Link - browse pc folders and copy mp3 files not in music folder

    Hello to all of you
    I have music archives in different drives and pendrives
    It is not intuhitive at all how to browse local PC drives and or PC folders to select and copy single or many .mp3 files from the PC to the BlackBerry device.
    Please don't tell me that the silly solution is to move the mp3 files to the windows music folder.
    Additionally, i find really against an user friendly approach the BlackBerry Link in the music section. It doesn't allow to show the mp3 files names and use, manage and browse .mp3 files by their name, I see only
    - All the music
    - Album
    - Artists
    - Genres
    - Playlists
    well,
    - I have so many .mp3 files
    - they don't have all the mp3 tags
    - I see only an unfinished list which doesn't allow me to select the file I need, and I must scroll all of them every time
    A TOTAL NO SENSE in my personal opinion
    Anyway , from BalckBerry Link and from PC side, how to select one single mp3 file, QUICKLY, and copy it inside the BlackBerry device in the music folder?
    Thank you
    C0r

    Yes CRAZY!!! It is confirmed,
    trying to find a solution to this crazy behavior, I've turned to documents side.
    I've added my mysic folder to the documents and TA-DAAAH! The .mp3 files don't show!!!
    On the right panel a big string says "The folder doesn't contain supported files"!!!
    Well, looks like that BlackBerry Link leaks like the OS 10
    Anyway, if you can provide a solution that allows to copy mp3 files ID3-less (http://en.wikipedia.org/wiki/ID3), mean that none of the ID3 has been filled, thank you so much in advance.
    To BB Link developers, think about allow users to tranfer files as files and not as you arbitrary want, thank you.
    C0r

  • PSE-10 how do I import and copy from external hard drive into organizer

    Can I import and copy from external hard drive into organizer? Under Get Photos, I select import  from folders/files but after browsing to the external hard drive the copy option is disabled/greyed out. I there a method to import and copy?

    That would be mounted as an internal drive and hence the corresponding option is not checked during Import.
    Once you import the media form this drive, you can select all and go for File >> Copy/Move files option and copy them wherever you want to.
    Hope this helps
    Thanks
    Andaleeb

  • Odd file move behavior

    On my startup disk, I have a movie file (.mov) and a folder I want to collect movies in. Straightforward enough.
    So I click/drag the .mov file onto the folder. It shows me the green + icon, and when I let go, it COPIES the file into the folder, not by simply MOVING the file from the disktop to the folder. Wha?
    When I grab that same file in the folder and move it to the disktop, it works as expected, insisting that it must be DUPLICATED, replacing the disktop, original file.
    OK. So instead of doing that, I decide to trash the original file, then move the version out of the folder and back to the disktop.
    In order to do that, I use the contextual menu that drops down with Control+mouse click. It now asks me for my administrator password to do the trash move. (???)
    Once the original has been tossed, the file will now move from folder to disktop and back to folder with complete impunity. But if I try this with another .mov file, the process starts all over again.
    No extra key combo during the original move gets rid of the + icon.
    Permissions were repaired. No change.
    Log off was cycled, no change.
    Obviously somehow this disk has picked up wierdness when Leopard replaced well-tempered Tiger on it, but where is the checkbox that dumps this odd behavior?
    No Right-click on the mighty mouse will bring down the contextual menu at all.

    Yea! The Mac is back on track!
    It took extra innings and a visit to 1 800 APL CARE to get to the bottom of it, but this therapy should be on everyone's A-list: The Install disk's version of Disk Utility is significantly different from any version you can install on your hard drives. Or so it would appear.
    Where the Disk Utility can be there for you on two different hard drives connected to the same computer, running it from different drives is not at all the same - in visible results - as running it directly from the OS X Install Disk.
    You can have several disks with OS X on them and run Disk Utility on your main startup disk from those, but they won't find all the messy permissions that are gumming up your system.
    It took yet another previous back up Restore cycle, an extra clean install, followed immediately by an Install Disk run of Disk Utility's First Aid/Repair Disk Permissions to clear the cobwebs. Frequent re-weedings (after any program installs or upgrades from anybody, including Apple's own) finds more things to fix. Not always, but frequently.
    The Install Disk's Disk Utility--it's not just for breakfast any more.

  • Using AppleScript/Automator to get file path and create AFP hyperlink

    Hi All,
    A colleague has asked for a service (contextual menu item in Finder) to get a selected item's remote (afp://) file path and copy it to the clipboard...  Pretty sure I've got that part down. 
    What I need advice on is how to make the resulting pasted file path into a serviceable hyperlink.  AFP keeps telling me there was an error connection to the server....  Does the copied path have to include mounting commands and user credentials for this to work??
    Thanks,
    Nathan

    Hi Richard - here's the script:
    tell application "Finder"
              set sel to the selection as text
              set TempTID to AppleScript's text item delimiters
              set AppleScript's text item delimiters to space
              set sel to text items of sel
              set AppleScript's text item delimiters to "%20"
              set sel to sel as string
              set AppleScript's text item delimiters to TempTID
    set the clipboard to "file://" & POSIX path of sel
    end tell

Maybe you are looking for

  • Does macbook come with Word already uploaded?

    and do I need to install the software that comes with it? It seems to me that it is only to be used as back-up.

  • Error While Installing Oracle On Linux Red Hat.

    Hi, For the last two days, I am trying to install Oracle 9i on Linux Redhat, but no vail. This is the error I come across-- "Initializing Java Virtual Machine From /tmp/OraInstall0/jre/bin/jre. Please wait... :symbol errno. version GLIBC-2.0 not defi

  • HT5313 Can OS X Lion run in 32bit format?

    I recently rolled back OS X Maverick to snow Lepord because I need the Mac to run in 32 bit format. I am expereincing popping and overload failuer in Logic Pro 9. Please help

  • PO holding Issue

    i have one problem in Holding the PO data... actually after holding the PO system issue a PO number let say 4500000058. then after doing changes in PO it shud save/post with same number but in my system it shows a different number for that 4500000060

  • I have macbook i have 2 OS. I want to remove windows. how to do that?

    I have macbook(intel core duo). Now macbook has two OS. Mac OS 10.4.6 and WinXP. Now i want to remove windows from it and upgrade my OS to snow leopard. I am unable find bootcamp etc. Please suggest the procedure. somnath.