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.
Professional Software Development Tools
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.
Try these two actions:
Folder.Create();
Zip.Extract();
Never know what life is gonna throw at you.
(Based on a true story.)
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.
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.
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.
Instead of
useCode:File.Copy("AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR", "C:\\progranas\\spyware doc\\", true, true, false, true, nil);
and see if that helps.Code:File.Copy(_SourceFolder.. "\\AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR", "C:\\progranas\\spyware doc\\", true, true, false, true, nil);
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:
HTHCode: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);
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek
Thnks all for your kind replies.
I've tried all your sugestions but still cannot copy the folder.
Best Rgds
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.
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
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.
ORCode:Folder.Create("C:\\programas\\spyware doc"); Zip.Add("C:\\programas\\spyware doc\\Myzip.Zip", _SourceFolder.. "\\AutoPlay\\Docs\\PORTABLE SPYWARE DOCTOR\\*.*, true, "", 5, nil, true);
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
is this the same code as what you are using?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);