#186683 - 2008-04-03 01:20 PM
Re: Open all files in dir, find phrase, insert text, write file
[Re: Glenn Barnas]
|
Curious
Getting the hang of it
Registered: 2004-02-16
Posts: 61
|
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:
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:
$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:
$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..
|
|
Top
|
|
|
|
Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-03-25 03:48 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Mart
|
2008-03-25 04:50 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
NTDOC
|
2008-03-25 06:29 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Mart
|
2008-03-25 08:24 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-03-26 11:06 AM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Mart
|
2008-03-26 01:35 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Glenn Barnas
|
2008-03-26 03:36 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-01 04:05 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-01 08:57 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-01 11:27 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Glenn Barnas
|
2008-04-02 12:32 AM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-03 01:20 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Glenn Barnas
|
2008-04-03 03:59 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-04 05:03 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Glenn Barnas
|
2008-04-04 08:17 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-05 12:11 AM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Glenn Barnas
|
2008-04-05 01:45 AM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-05 04:21 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Les
|
2008-04-03 05:06 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-01 09:32 AM
|
Re: Open all files in dir, find phrase, insert text, write file
|
NTDOC
|
2008-03-26 08:10 PM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Curious
|
2008-04-01 09:57 AM
|
Re: Open all files in dir, find phrase, insert text, write file
|
Glenn Barnas
|
2008-04-01 01:05 PM
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 962 anonymous users online.
|
|
|