Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2005
    Posts
    10

    action to decompress file.

    Is it possible to decompress a certain file in a determinated folder and this folder be created by automedia ?

    If yes, pls inform which action should I use.

    Thnks in advance.

  2. #2
    Join Date
    May 2005
    Posts
    1,115
    Try these two actions:

    Folder.Create();

    Zip.Extract();
    Never know what life is gonna throw at you.
    (Based on a true story.)

  3. #3
    Join Date
    Sep 2005
    Posts
    10
    Thnks a lot Bule. That I've tried already. The problem is that folder can be created, but nothing happens when action to decompress is set.

    Even if I manualy decompress the file to a folder and want to copy that folder, using copy file action, again nothing is copyed.

    Pls help again.

    Sorry, but newbie here
    Last edited by holmes; 10-04-2006 at 09:36 PM.

  4. #4
    Join Date
    Dec 2003
    Posts
    891
    Is the folder you created in the project directory (AutoPlay\Docs\ZipFolder etc.)?
    Tip:
    Go to the AMS Edit-Preferences window. Check the Debug window. Then preview the project. When the unworking action is done, check to see if the copy file action has an error of "cannot find folder or file". If this is the case and you are sure that you have the folder/file, then the project is confused on where the path is.
    If they are in the project directory, then you'll need to set the path with a Global variable.
    EX: _SourceFolder.. "\\AutoPlay\\Docs\\ZipFolder
    Another thing, if you can, export the project (.apz) and post it with your question. This will help us help you.

  5. #5
    Join Date
    Sep 2005
    Posts
    10
    Folder.Create("C:\\programas\\spyware doc");
    File.Copy("AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR", "C:\\progranas\\spyware doc\\", true, true, false, true, nil);


    Debug window shows nothing. Above are the actions I'm using. without success.

    Why can´t the folder PORTABLE SPYWARE DOCTOR be copied to C:\\progranas\\spyware doc\ ?

    Thnks again for your help.

  6. #6
    Join Date
    Dec 2003
    Posts
    891
    Instead of
    Code:
    File.Copy("AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR", "C:\\progranas\\spyware doc\\", true, true, false, true, nil);
    use
    Code:
    File.Copy(_SourceFolder.. "\\AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR", "C:\\progranas\\spyware doc\\", true, true, false, true, nil);
    and see if that helps.

  7. #7
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    One other thingI noticed is a type-o in your path
    you spell it
    progranas

    & you spell it
    programas

    Another thing you might look at is the fact that Lua code runs very fast, it is possible that the code is running faster than your computer can create the folder.

    You might try something like this:
    Code:
    Folder.Create("C:\\programas\\spyware doc");
    -- wait a moment
    Application.Sleep(1000);
    
    File.Copy("AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR", "C:\\programas\\spyware doc\\", true, true, false, true, nil);
    HTH
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

  8. #8
    Join Date
    Sep 2005
    Posts
    10
    Thnks all for your kind replies.

    I've tried all your sugestions but still cannot copy the folder.

    Best Rgds

  9. #9
    Join Date
    Dec 2003
    Posts
    891
    Again, we can't help much without an .apz example of what you are doing.
    Along with the above mentioned things, I also see that you are trying to copy a folder with File.Copy action. It should be Folder.Copy
    Another thing is that the file in the PORTABLE SPYWARE DOCTOR folder still being used by AMS (file is opened) In a zip function, the file is being manipulated in a temp directory until the action is complete. It may not be closing the file before trying to copy it.
    Several more things come to mind, but it would be quicker for you to export the apz than for me to guess and type.
    If you are afraid someone may "steal" your code, then create a project that just does this one thing and post it.
    Other than that, I can't help you.

  10. #10
    Join Date
    Sep 2005
    Posts
    10
    Hi Roboblue. Seems that attaching files is now disabled in this board. I'll try later, BTW Folder copy doesn't exist in action options.

    Thnks for your help

  11. #11
    Join Date
    Dec 2003
    Posts
    891
    You're right it doesn't.

    Ok, Are you trying to create a zip file from all the files in the the PORTABLE SPYWARE DOCTOR folder into the C:\\programas\\spyware doc folder? if so, try this.
    Code:
    Folder.Create("C:\\programas\\spyware doc");
    Zip.Add("C:\\programas\\spyware doc\\Myzip.Zip", _SourceFolder.. "\\AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR\\*.*, true, "", 5, nil, true);
    OR
    Have you already created a zip file in the PORTABLE SPYWARE DOCTOR folder and want to extract the zip to the C:\\programas\\spyware doc folder? If so, try this
    Code:
    Folder.Create("C:\\programas\\spyware doc");
    Zip.Extract(_SourceFolder.. "\\AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR\\MyZip.zip", {"*.*"}, "C:\\programas\\spyware doc", true, true, "", ZIP_OVERWRITE_ALWAYS, nil);
    is this the same code as what you are using?

Similar Threads

  1. 2 BUGS...Internet Download action and File Search Action
    By Martin_SBT in forum AutoPlay Media Studio 4.0
    Replies: 3
    Last Post: 07-08-2003, 08:30 AM
  2. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM
  3. SUF6.0.0.2 -- installer hangs.
    By jassing in forum Setup Factory 6.0
    Replies: 4
    Last Post: 12-19-2001, 11:28 PM
  4. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts