I will look At the possibility to make an udf later.

Right now, I consentrate on implementing the zip-routine. I will have all zip-files that needs to be processed ready In one Dir. I will Use 7z.exe. What I need getting done: Extract all zip-files In this area, AND put the extracted files In one location. 7z.exe will be in the $ZipDir. The syntax For 7z will be like this:

 Code:
7z e *.zip *.sos -oOutDir


where *.sos will be the file-type to be extracted, AND OutDir is the output-directory.

I was thinking the script will be something like this:

 Code:
$zipDir = 'c:\sosi\zip\'
$zipOutDir = 'Utpakket\'

Run "%COMSPEC% /e:1024 /c $ZipDir'7z.exe e'+$ZipDir+ '*.zip *.sos' + '-o'+$ZipDir+$ZipOutDir"


But something is wrong, can't see it right now. This might not be the right way to run this dos-program?

Btw Glenn, I will try to "sharpen" up regarding vars in strings etc.

I was looking through using this run-command, and it seems to me that there are problems using vars inside the run-syntax
The solution (at least so far..) was to define a var containing the syntax for the run-command, like this:

 Code:
$ZipDir = 'c:\sosi\zip\'
$zipOutDir = 'Utpakket'
$RunZip = $ZipDir+'7z.exe e '+$ZipDir+'*.zip *.sos -o'+$ZipDir+$ZipOutDir

Run "%COMSPEC% /e:1024 /c $RunZip"


Is this the best way to do this??


Jon


Edited by Curious (2008-04-03 02:07 PM)
_________________________
I was placed on earth to do a job. Right now I have so much to do, I will never die..