Copying Files Without Knowing

Hi guys
Is there a way to get some files from a computer that i do some maintenance via ARD without disturbing the current user and her work?. The thing that i need is to get the Entourage and Thunderbird folder for a monthly backup.
Is there a way to do this?.
Thanks guys!
PS: just tryed to use the spelling check and it's no good

Sorry to ask greeper, but i' kindda newbby on Unix... can you explain me a little of that command?. Tell me if i'm right
cp = copy
-R = if for hidden root?
/Applications/Thunderbird/ = isn't supposed to be like /User/Apps/Thunder/?
/pathto_yourbackup/ = something like /User/Desktop/BACKUP/
Something like that?.
Do you know if there is a way to kill an active process, like killing or quiting Thunderbird and Entourage via ARD?.
Thanks for the help

Similar Messages

  • Copy file without retyping its name

    I`m just starting to use Java (in school) so I need help even with simple things like this: I have to copy file without retyping its name in destination. I`ve tried to use substring method for extracting filename, but it gives me an error "The method substring() is undefined for type Copy". Any help?
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    public class Copy{
         * @param args
         public static void main(String[] args) {
              try {
                   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    //Entering the path to the file that I want to copy
                   System.out.println("Enter file path");
                   String filePath= br.readLine();
    //Entering the destination for copied file
                   System.out.println("Enter destination");
                   String destination = br.readLine();
                   FileInputStream fis = new FileInputStream(filePath);
                   FileOutputStream fos = new FileOutputStream(destination);
                   int c=0;
                   while((c=fis.read())!=-1){
                        fos.write(c);
                   fis.close();
                   fos.close();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    }

    cereal_killer wrote:
    No. I expected this (String fileName = substring(filePath.lastIndexOf("/")+1, filePath.length());) to workYou didn't provide a string reference on which to execute substring. As in:
    String str = "blah blah blah";
    String fileName = str.substring(...);
    {code}If you just say *substring(start, end)* how is it supposed to know *which* String object to operate on?
    Without the someStringReference. preceding it, calling a method--in your case substring--is like calling it on this object, i.e., like this.substring. Your class does not define a substring method, so it's a compile time error to try to call that non-existent method.

  • How to get the jar file without knowing its name and any class inside it?

    Hello, everybody!
    I would like to know if there's a way to get a reference programatically to the initial jar without knowing its name and any class contained in it. By "initial jar" I mean the jar that was called in the prompt, like this:
    java -jar jarfile.jaror in another way, in a graphical system. To be sincere what I really want is to get a reference to the jar's manifest, but I know if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also help. So, is there a way to do this?
    Thank you.
    Marcos

    jverd wrote:
    marcos_aps wrote:
    abillconsl wrote:
    Can you be more specific - IOW, can you cite a specific case?Absolutely. I want to access the jar in source code with the java.util.zip.JarFile class, for example.But why? You still haven't provided a use case or explained what you're trying to accomplish. As already pointed out, whatever you're trying to do, this is a brittle solution. If you explain what you're trying to accomplish with this, somebody may be able to suggest a better approach.jverd, I explained for baftos. Anyway, I will try to be more specific. I start my sytem like this, from, say, for example, jar1.jar:
    import br.product.System;
    public static void main(String[] args)
        System.start("NameOfTheSystem");
    }The System class is in util.jar, for example. This jar is used by all systems. I wouldn't like to pass in the name of the system, as above. I would like that the System class could read it from jar1.jar's manifest file. I just would like to have this:
    import br.product.System;
    public static void main(String[] args)
        System.start();
    }It is more elegant and I don't have the name of the system in two places: code and manifest file.
    Marcos

  • Read file without knowing full name

    Dear All,
    I want to read data from a file but without knowing the file's full name.
    For example i have data files from a program that the first letters of the data files are the date and the rest some numbers i cannot predict i.e 20081027_5323621.
    Is it possible to read this file by knowing only the characters that correspond to the date?
    thanks!
    Solved!
    Go to Solution.

    Yes,
    You can set a pattern in the file dialog that points to the date (formatted).
    The output of the file dialog will be the complete file path for the file that was selected..
    One question..  Do you want a popup window to browse for the file?  to allow selecting one of the matching file(s)...
    Because there may be more than one file that has a matching date...
    R
    Message Edited by JoeLabView on 10-27-2008 01:09 PM
    Attachments:
    patternFileDialog.PNG ‏2 KB

  • Copying file without passing bytes

    Hi, I need to be able to copy binary files from a web location to a directory on my local machine. The app needs to do nothing except copy the files. Is there a way of handling this outside the javaVM, ie set up a channel from the weblocation to the local location without the data having to be passed through java?

    The only way to get things done in a computer is via a program. If you don't want to use your own program you'll have to use someone else program. You can start it from Java using one of the exec methods of class Runtime.

  • How do I Copy files from one directory to another?

    I know how to move files using the renameTo() method of File class, but is there a simple way to copy files, without the need of reading the input stream form one file and writing to a new one?

    Hi all,
    I ripped this off the jakarta-ant project's file copier (with a small tweak)..
    package com.museumcompany.util;
    import java.io.IOException;
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.lang.reflect.Method;
    import java.text.DecimalFormat;
    import java.util.Random;
    import java.util.Stack;
    import java.util.StringTokenizer;
    * This class also encapsulates methods which allow Files to be
    * refered to using abstract path names which are translated to native
    * system file paths at runtime as well as copying files or setting
    * there last modification time.
    * @author [email protected]
    * @author Conor MacNeill
    * @author Stefan Bodewig
    * @version $Revision: 1.8 $
    public class FileUtils {
    private static Random rand = new Random(System.currentTimeMillis());
    private static Object lockReflection = new Object();
    * Factory method.
    public static FileUtils newFileUtils() {
    return new FileUtils();
    * Empty constructor.
    protected FileUtils() {}
    * Convienence method to copy a file from a source to a destination.
    * Overwrite is prevented, and the last modified is kept.
    * @throws IOException
    public void copyFile(String sourceFile, String destFile) throws IOException {
    copyFile(new File(sourceFile), new File(destFile), false, true);
    * Method to copy a file from a source to a
    * destination specifying if
    * source files may overwrite newer destination files and the
    * last modified time of <code>destFile</code> file should be made equal
    * to the last modified time of <code>sourceFile</code>.
    * @throws IOException
    public void copyFile(File sourceFile, File destFile,
    boolean overwrite, boolean preserveLastModified)
    throws IOException {
    if (overwrite || !destFile.exists() ||
    destFile.lastModified() < sourceFile.lastModified()) {
    if (destFile.exists() && destFile.isFile()) {
    destFile.delete();
    // ensure that parent dir of dest file exists!
    // not using getParentFile method to stay 1.1 compat
    File parent = new File(destFile.getParent());
    if (!parent.exists()) {
    parent.mkdirs();
    FileInputStream in = new FileInputStream(sourceFile);
    FileOutputStream out = new FileOutputStream(destFile);
    byte[] buffer = new byte[8 * 1024];
    int count = 0;
    do {
    out.write(buffer, 0, count);
    count = in.read(buffer, 0, buffer.length);
    } while (count != -1);
    in.close();
    out.close();
    if (preserveLastModified) {
    destFile.setLastModified(sourceFile.lastModified());
    public File createTempFile(String prefix, String suffix, File parentDir) {
    File result = null;
    DecimalFormat fmt = new DecimalFormat("#####");
    synchronized (rand) {
    do {
    result = new File(parentDir,
    prefix + fmt.format(rand.nextInt())
    + suffix);
    } while (result.exists());
    return result;

  • Deleting copied file

    I recently purchased a MacBook Pro. I am new to Macs. I copied a file from All Images to the desktop. To copy it I dragged it to the desktop. The copied file on the desktop has the exact same file name as the file in All Images. When I move the file on the desktop to Trash it also moves the original file in All Images to Trash. How do I delete the copied file without affecting the original file. To me it seems like the two files are one and the same because the copied file doesn't have a different file name. And the copied file is not an alias either.
    Thanks for any help on this.

    All Images is not an actual folder. It's a saved search. (Same goes for all other preset items in the "Search For" section of the sidebar). It lists all images on your computer. since it's not an actual folder you can't put anything in it. when you dragged the picture file from All Images to the desktop it was moved from its original location (wherever that was) to the desktop. You need to know its original location. then you can move it back there from the desktop.

  • How to replace or remove last 500 bytes of a file without rewriting all the file?

    Hi everyone,
    Usually I only ask for help when I can't find a solution for several days or weeks... And guess what? That just happen!
    So, this is what i am trying to do:
    I have a program to ZIP folder and protect them with password, then it encrypts the zip file.
    That it's working fine, until the user forgets his password.
    So, what I want to do is give the user a Recovery Password option for each ZIP file created. I can't use the Windows Registry because the idea is to be able to recover the password in any computer.So i came up with an idea...
    In simple terms, this will work like this:
    0 - Choose folder to ZIP
    1 - Ask user for recover details (date of birth, email etc)
    2 - ZIP folder with password
    3 - Encrypt ZIP file
    4 - Encrypt recover details and convert it to HEX
    5 - Add recover details (in HEX) to the end of the ZIP file (last bytes)
    6 - Add "5265636F76657244657461696C73" which is the text "RecoverDetails" in HEX
    7 - Add "504B0506000000000000000000000000000000000000" this is the final bytes of a ZIP file and will make the Operating System think that is a ZIP file (i know that will give an error when we try to open it.. the ideia is to change the
    extension later and use my software to do all the work to access this ZIP/folder again)
    So, explaining what it's here, I want to say that I managed how to do all of this so far. The point number 6 will help us to determine where the recover details are in the file, or if they actually exist because user can choose not to use them.
    In order to unlock this ZIP and extract it's contents, I need to reverse what I've done. That means, that  need to read only the last 500 bytes (or less if the file is smaller) of the ZIP and remove those extra bytes I added so the program can check
    if the user is inputing a correct password, and if so decrypt contents and extract them.
    But, if the user insert a wrong password I need to re-add those bytes with the recover details again to the ZIP file.
    The second thing is, if the user forgets his password and asks to recover it, a form will be shown asking to insert the recover detail (date of birth, email etc), so we need to reed the last 500 bytes of the ZIP, find the bytes in number 6 and remove the
    bytes before number 6, remove bytes in number 6 and number 7, and we will have the recover details to match against the user details input.
    I have all done so far with the locking process. But i need help with the unlocking.
    I am not sure if it's possible, but this what i am looking for:
    Read last 500 bytes of a file, remove the bytes with recover details and save the file. Without reading the whole file, because if we have a 1GB file that will take a very long time. Also, i don't want to "waste" hard drive space creating a new
    clone file with 1GB and then delete the original.
    And then add them back "in case user fails the password" which should be exactly the same.
    This sounds a bit confusing I know, even to me, I am writing and trying to explain this the better I can.. Also my English is not the best..
    Here it goes some code to better understanding:
    'READ LAST 500 BYTES OF ZIP FILE TO CHECK IF IT CONTAINS RECOVER DETAILS
    Dim oFileStream As New FileStream(TextBox_ZIP_to_Protect.Text & ".zip", FileMode.Open, FileAccess.Read)
    Dim oBinaryReader As New BinaryReader(oFileStream)
    Dim lBytes As Long = oFileStream.Length
    oBinaryReader.BaseStream.Position = lBytes - 500
    Dim fileData As Byte() = oBinaryReader.ReadBytes(500)
    oBinaryReader.Close()
    oFileStream.Close()
    Dim txtTemp As New System.Text.StringBuilder()
    For Each myByte As Byte In fileData
    txtTemp.Append(myByte.ToString("X2"))
    Next
    Dim RecoveryDetailsPass_Holder = txtTemp.ToString()
    'Dim Temp_2 = txtTemp.ToString()
    'RichTextBox1.Text = txtTemp.ToString()
    If txtTemp.ToString.Contains("505245434F47414653") Then
    'we have password recovery details(the numbers mean RecoverDetails in HEX)
    'next we will get rid of everything before and after of string "cut_at"
    Dim mystr As String = RecoveryDetailsPass_Holder 'RichTextBox1.Text
    Dim cut_at As String = "505245434F47414653"
    Dim x As Integer = InStr(mystr, cut_at)
    ' Dim string_before As String = mystr.Substring(0, x - 1)
    Dim string_after As String = mystr.Substring(x + cut_at.Length - 1)
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace(string_after.ToString, "")
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace("505245434F47414653", "") ' this is RecoverDetails in HEX
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace("504B0506000000000000000000000000000000000000", "") ' this is the bytes of an empty zip file
    'AT THIS POINT WE HAVE ONLY THE RECOVER PASSWORD DETAILS (date of birth, email etc) IN THE VARIABLE "RecoveryDetailsPass_Holder"
    '////////////////////////////////////////////////////// TO DEBUG
    'MsgBox(string_after.ToString & "505245434F47414653")
    'InputBox("", "", string_after.ToString)
    '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ TO DEBUG
    'Temp_2 = Temp_2.Replace(RecoveryDetailsPass_Holder.ToString, "")
    Now that we have the recover details, we need to remove them from ZIP in order to the software try to unzip it with the password provided by the user on the GUI.
    If the user needs to recover the password we have the details already in RecoveryDetailsPass_Holder variable and just need to match them against user input details.
    If the user fails, we need to put the RecoveryDetailsPass_Holder back on the file.
    Any question just ask, it's a bit trick to explain i think, but please ask.
    Anyone know how to do this?
    Many thanks in advanced.
    Nothing is impossible!
    @ Portugal
    Vote if it's helpfull :)

    @ ALL
    Thank you very much for you help. I know that if I'm "playing" with bytes you should assume that I know a lot of VB.net, but I don't know that much unfortunately. I am not a beginner but I am still very fresh and I probably do stuff that work but
    probably not in the best way...
    Anyway, I will explain the idea of this little software I'm making. Once I wanted to create a program to protect folders with password, and I came up with something to change folder permissions to lock access to them, and that actually worked fine and quickly.
    However, I managed how to "crack" the protection by going to folder properties, security tab and then give permissions back to my username. So that, to me, wasn't a safer system to protect folders, also I want the ability to use passwords. So I search
    and search online for a way to do it, and someone replied (to someone with the same question as me) that the best option would be to create a zip with all contents of the folder, with password and then change the extension from .zip to .whatever and register
    the new extension .whatever on the Windows Registry, so that file will have an icon and open with my software.
    So I did...The program zips everything, change the extension and I added the encryption to avoid people changing the extension to ZIP or trying to open with 7-Zip or similar and be able to see the protected files names in the .zip/.whatever
    Answering to all of you now:
    @Armi
    "System.IO.FileStream.SetLength"
    I know I tried that but I erased the code because it didn't work for some reason, I don't remember why sorry, was long time before I created this post.
    The last code I was trying to use was this:
    ' Set the stream position to the desired location of the stream.
    Dim fileStream As IO.FileStream = _
    New IO.FileStream(TextBox_ZIP_to_Protect.Text & ".zip", IO.FileMode.Append)
    Try
    ' Set the stream (OFFSET) position to the desired location of the stream.
    fileStream.Seek(210, IO.SeekOrigin.Current)
    Dim Bytes_do_ZE As Byte() = HexStringToByteArray(Temp_2.ToString)
    'Write Characters ASCII
    For Each Byte_Do_Zeca As Byte In Bytes_do_ZE
    fileStream.WriteByte(Byte_Do_Zeca)
    Next
    Finally
    fileStream.Close()
    End Try
    and we need this:
    Private Shared Function HexStringToByteArray(ByRef strInput As String) As Byte()
    Dim length As Integer
    Dim bOutput As Byte()
    Dim c(1) As Integer
    length = strInput.Length / 2
    ReDim bOutput(length - 1)
    For i As Integer = 0 To (length - 1)
    For j As Integer = 0 To 1
    c(j) = Asc(strInput.Chars(i * 2 + j))
    If ((c(j) >= Asc("0")) And (c(j) <= Asc("9"))) Then
    c(j) = c(j) - Asc("0")
    ElseIf ((c(j) >= Asc("A")) And (c(j) <= Asc("F"))) Then
    c(j) = c(j) - Asc("A") + &HA
    ElseIf ((c(j) >= Asc("a")) And (c(j) <= Asc("f"))) Then
    c(j) = c(j) - Asc("a") + &HA
    End If
    Next j
    bOutput(i) = (c(0) * &H10 + c(1))
    Next i
    Return (bOutput)
    End Function
    That code, as I understand, is to search for the OFFSET of the bytes in the file and start to write from there... That OFFSET should be the beginning of the 500 bytes read on the code before. I got the OFFSET position "210" reading the file with
    the HEX editor "HxD - Hexeditor v1.7.7.0" but using the OFFSET won't work because every file, password, recover details and so on, are different and so the file size, changing the OFFSET I
    think.
    @Reed Kimble
    Does that sound like something which might work for you?
    Thanks for your help. That might be some solution, however it seams a bit of the same problem where we need to read the bytes again to get the recover details. But, as I said in this post, because this is meant to password protect folders, do you think that
    will apply as well?
    @Crazypennie
    Thanks for your reply.
    All this appears really weak. The user has your application since he need it to open the file .... and the code in the application contain the code to read the file without knowing the password. Therefore anyone can read your code and retrieve the
    data without the password ... if he knows VB.
    The application can only open the file if the user didn't use a password to protect the file. Because the file is encrypted and needs to be unencrypted first.
    When the application tries to open/read the file, will need to decrypt it first and then check for a password and do the validation. Also the application is with the code masked/protected which i think it might not be easy for reverse engineering.
    - You need to use a web server and a symmetric key encryption
    This a good idea, besides I don't know how to implement it. However the idea is to be able to:
    1 - Protect a folder anywhere in any Windows computer (portable app)
    2 - Recover password details (security question) in any computer, online and offline
    And I think we need a computer always connected to the Internet to use that method, right?
    @ Mr. Monkeyboy
    Thank you very much for your effort.
    I just wanted to let you know that the zip method you are using is no longer supported.
    I didn't actually knew that. Thanks for letting me know.
    Do you require the compressed encrypted files to actually be Zip files or could they just be compressed files that have nothing to do with Zip?
    No, it doesn't need to be a .zip extension. I am actually using my own extension. It starts as a Zip but then I changed to my own extension which I have registered on the Windows Registry.
    @ ALL
    Thanks again to all for trying and spending time helping me.
    By the way, I might not be able to answer or try any code during the weekend... It's easter break and family is around. Have a nice easter everyone. :)
    Nothing is impossible! Imagination is the limit!

  • CS6 Project Manager - Copying Files not advancing

    Hello,
    I am about to travel to Europe and I need to bring a CS6 project with me to continue editing on a laptop.
    I choosed "Collect Files and Copy to New Location". Project Manager analyzed the project and started the copying process, although the bar is not advancing and it is now 1h that is stuck at the sasme point.
    The external hard drive tha I am using to export the managed project looks like is writing, but in the project manager window the bar is not advancing.
    The project I am exporting is a full lenght film, and I cannot use the OSX finder to manually create a managed project due to its complexity.
    Here some details about the project:
    -Premiere CS6 is running on a 12cores Mac Pro, 64Gb Ram with 6TB internal raid
    -The external hard drive I am copying the managed project into is a 2TB Glyph e-Sata hard drive (currently showing signs of writing data)
    -The size of the managed project (including 3 sequences) is about 500GB
    -I choosed the option to collect files and Copy to New Location (Glyph Drive)
    -The footage is a mixed timeline of 4K Red and 5K Epic r3d files
    I already tried to abort the process and start ober again, several times but I always end up looking at the Project manager copying files without advancing.
    Any idea?
    I have a flight in 8h and I cannot leave without this project.
    Thanks!!!

    Not all media types can be trimmed.  In this case, Adobe cant write to the proprietary RED codec.  (You notice there's no RED export options.)

  • ITunes copies files without the "copy files to Media folder" checked.

    I've never been a fan of iTunes. My dislike of its impositive ways is directly proportional to its version (10.1.1(4) currently), so I never allow it to do anything automatically for me. I really like it that way.
    In recent years, after a couple of experiences filled with much tribulation, I have never checked either "Keep iTunes folder media organised" nor "Copy files to iTunes media folder when adding to library" under its Preferences, whenever I have been forced to use this accursed application.
    But owning an iPod (a couple actually) makes it impossible to live a jovial iTunes-free lifestyle. So yes, I use it on occasion.
    Those occasions almost exclusively mean copying music and audio books to and from it. No videos, no Pictures, no nothing else.
    I'm using a 4th Generation iPod Touch.
    My iTunes library is not on my computer but on an external HD.
    Anything I drag and drop to the library comes from folders in that external HD.
    Now, the few audio books I own are not even inside my iTunes media folder. They are elsewhere in a folder of their own. But everything had worked O.K.ish so far.
    Today, while re-tagging some audio books I asked iTunes to show the file in Finder. And it did. It was indeed inside that external HD... BUT... on the iTunes media folder, not on the folder where I keep those audio books originally.
    I checked the iTunes "Preferences" to see if the Gremlins had changed anything. It was as it has always been (with all pertinent options unchecked).
    I checked the original folder to see if they had been moved. Nope, they were still there too.
    The versions are not the same, since all that re-tagging I'd been doing had of course affected the ones in the "wrong" folder (the one I did not assigned nor agreed to create).
    The music is fine (some of which comes from a folder similarly outside the iTunes media folder, although most comes from within), it's just the audio books.
    An event of note is that a few days ago, that external HD had a problem and the data had to be moved elsewhere, the HD re-formatted, and the info placed back into it once more. But the paths remain identical since the HD has the same name and the folders are where they once were. I've no idea if this has any effect on anything at all, but I thought to mention it.
    So this mystery is such. Any takers?
    The questions are: Why does this happen? How can I stop it from happening again (aside from not using iTunes :-D).
    It is not that big a problem since I have very few audio books thus the duplicate is not too large, but I'd like to know how to avoid it, if possible.
    Thanks in advance for any information on this.

    iTunes prefs -> Advanced. Uncheck *Copy files to iTunes music folder when adding to library*.
    Any reason you don't want them in the music folder? You could add them to iTunes and delete the from your documents folder.

  • How do I use a FileStream with an IFilePromise without knowing the File?

    I've finished the implmentation of my project using Async IFilePromises by extending the ByteArray class. I can drag out of my application and files are created by copying bits over the network, etc. The issue I'm running into is that because I used the ByteArray as my dataprovider, files are stored "In-Memory" until the Close event is fired.
    My application routinely copies files around 700 MB and up to 2 GB. The implementation quickly causes out of memory errors. That said, if I change the implementation to use FileStreams then the files are written directly to disk and memory is exactly where I want it to be.
    The issue is that the FileStream requires a File object when it's FileStream.open(File, FileMode) method is called. If I manually create a file and use it, then everything is fine, but doing that defeats the purpose of the FilePromise. I lose all the information about where a person dropped the file.
    So how do I get access to the File object that is created for each FilePromise? I know one is created by inspecting the call stack when the IFilePromise.open() method is called and inspecting the caller MacFilePromiseWrapper._file.
    I've tried simply returning a plain FileStream instead of an extended class in the IFilePromise.open method, but that still gives the same error result when I try to write to the stream (says that the stream isnt open yet).
    I would have expected the MacFilePromiseWrapper / FilePromiseWrapper to intelligently handle the returned IDataProvider and perform any "open" and "close" it needed. Please tell me I'm just missing something obvious. I'm so close to being done with this project and I don't want to have to rewrite this using a native implementation. The performance issues (memory usage) will cause me to do just that if I cant figure this out.
    Thanks for any help,
    Jared

    I have resolved the issues myself.
    I had the idea of an IFilePromise / IDataInput backwards. The way I thought it worked is that what you were "writing to" when you wrote into a ByteArray and fired of progress events was simply a pipe to a file handle on the disk. That's backwards.  What really happens is that the thing you're writing to is a buffer for the IFilePromise. Firing the open/progress/close events let the file system know that it's safe to pull up to IDataInput.bytesAvailable out of your buffer and write that to the disk and the buffer you write to can be a ByteArray, Socket, FileStream, etc.
    The confusion was compounded by my attempts to use FileStream as the IDataInput. What I was doing for "testing purposes" was creating a temporary file and writing my bytes to it. The file handle created by the FilePromise would immediately disappear, so I thought it meant I needed to somehow get access to that handle so I knew where to send my bits using FileStream.open(File, FileMode).
    I was really close, but had a mistake in there.  I was on the right track with opening the FileStrea and using the temporary file, but I opened it with the wrong FileMode.
    I used FileMode.WRITE because I thought I was writing to the disk only. When I switched it to FileMode.UPDATE (which is read/write) then everything worked as I needed it to.
    So to summarize, to use a FileStream as the IDataInput for an IFilePromise you need to:
    Create the FileStream object and return it when the IFilePromise.open is called
    When you get bytes off your network, etc, dispatch the OPEN event
    Open the FileStream object with FileMode.UPDATE and use a temporary file provided by File.createTempFile(), store it for later
    Write bytes to the FileStream and send out the proper ProgressEvent.PROGRESS events
    Dispatch the COMPLETE event when you're done
    the IFilePromise.end() method will be called and you have an opportunity to close your FileStream and to delete the temporary file that was created
    I hope this helps someone that runs into a similar issue.

  • I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD

    I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD

    To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
    Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
    Ciao.

  • Save a pdf file without Adobe automatically adding "-Copy" to the end

    How can I save a pdf file without Adobe automatically adding "-Copy" to the end of file name?

    If you have actually made any changes (e.g. adding a Sticky Note or filling out forms), the Save button will appear in the bottom toolbar.  It will save it as the same name.
    "- Copy" is added only when you tap/click the Save As button.  You can change it to something else, if you'd like.

  • Is possible see a pdf file without the buttons of the program adobe? don´t permit a copy of the file

    Is possible see a pdf file without the buttons of the program adobe? don´t permit a copy of the file

    For the hiding, go to the document properties under initial view. You may confuse some folks if there is no file menu to close the file (a lot of folks just can't get the keyboard shortcut, alt-F4, into their head. They are going to look for where to find the file menu to close.

  • Upgraded to Lion without knowing I would no longer be able to open old Apple Works files.  Is there a way to solve this problem?

    Upgraded to Lion without Knowing I would no longer be able to open my old Apple Works files.  Is there a way to solve this problem.

    Pages will open the Word Processing ones.
    Regards
    TD

Maybe you are looking for