forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


commad line winzip program?
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Feb 16, 2005 4:03 am    Post subject: Reply with quote

Here's the command line switches for unzip32.exe

Quote:

UnZip 5.42 of 14 January 2001, by Info-ZIP. Maintained by C. Spieler. Send
bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.

Usage: unzip32 [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).

-p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment
-x exclude files that follow (in xlist) -d extract files into exdir

modifiers: -q quiet mode (-qq => quieter)
-n never overwrite existing files -a auto-convert any text files
-o overwrite files WITHOUT prompting -aa treat ALL files as text
-j junk paths (do not make directories) -v be verbose/print version info
-C match filenames case-insensitively -L make (some) names lowercase
-$ label removables (-$$ => fixed disks) -V retain VMS version numbers
-X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'
-M pipe through "more" pager
Examples (see unzip.txt for more info):
unzip32 data1 -x joe => extract all files except joe from zipfile data1.zip
unzip32 -fo foo ReadMe => quietly replace existing ReadMe if archive file newer


_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Feb 16, 2005 4:09 am    Post subject: Reply with quote

And here's how to build a comma delimited string from a list box contents:

Code:


  list create,1
  list loadtext,1
"Item 1
"Item 2
"Item 3
"Item 4
"Item 5
"Item 6
"Item 7
"Item 8
"Item 9

  %x = 0
  %%outStr =

rem METHOD ONE
  repeat
    %I = @item(1,%x)
    %%outStr = %%outStr%I@chr(44)
    %x = @succ(%x)
  until @equal(%x,@count(1))
  rem trim off the extra comma
  %%outStr = @substr(%%outStr,1,-1)

  info %%outStr

rem METHOD TWO
  %%outStr = @text(1)
  repeat
    %P = @pos(@cr(),%%outStr)
    if @greater(%P,0)
      %%outStr = @strdel(%%outStr,%P)
      %%outStr = @strins(%%outStr,%P,@chr(44))
    end
  until @zero(%P)

  rem trim off the extra comma
  %%outStr = @strdel(%%outStr,1,-1)

  info %%outStr

  list close,1
  exit


_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Feb 16, 2005 6:13 am    Post subject: Reply with quote

humm that would work but i'am using this code to pick files Sad

Code:

%F = @filedlg("All Files (*.*)|*.*",Add File,c:\watever\*.*,MULTI)


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Feb 16, 2005 8:26 am    Post subject: Reply with quote

tim6389 wrote:
hummm my question is

Code:

RUNH ZIP.EXE -r -S -b @env(TEMP) @chr(34)%D%N@chr(34) @chr(34)%F@chr(34),wait


he used it with out having any problems or without using commad com..

bweckel that /c seemed to work BUT i know xp uses a diff commad so will this work on xp? and i can't find any info on that unzip can you unzip it to a folder you want? or does it unzip to the current and you can't chnage it.......

thanks


Why do you need to use command.com (or cmd.exe)? That's using VDS to run a program to run another program. It's an extra unnecessary level. The only reason for using a command shell is if you need to redirect standard output to a file, so you can load the file back into VDS and see what happened with the program. But there is no need to do this with zip.exe because it givea a return code that you can test to see if it worked or failed.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Feb 16, 2005 11:22 pm    Post subject: Reply with quote

the reason why is because that zip.exe is not exiting when its done making vds "wait" Sad
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 17, 2005 12:20 am    Post subject: Reply with quote

First of all, zip.exe isn't making VDS wait, VDS is waiting for zip.exe to
finish doing its task.

And are you checking for @retcode() for the error
code returned by zip.exe? If it isn't zero, then there is some other kind of
problem, which from my experience with console apps, the error code
denotes a particular error that is either documented in the documentation
or that can be sent to the apps author to verify the problem.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 17, 2005 1:46 am    Post subject: Reply with quote

yes right it waiting to finish the task but when i uses command.com /c it works fine for some reason...and there is no errors codes when i don't uses command.com /c..i'am not sure why it sodes this but i'am goin gto play with it some more later tonight
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Feb 17, 2005 6:44 am    Post subject: Reply with quote

anyone know how to build a comma delimited string when using @filedlg?

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 17, 2005 8:22 am    Post subject: Reply with quote

After calling %%files = @filedlg(%%filter,Open,,MULTI), assign the
variable to a string list, list assign,1,%%files then use one of the
methods that I posted earlier to build your comma delimited string.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Fri Feb 18, 2005 8:08 pm    Post subject: Reply with quote

thanks bweckel

i will get this a try later tonight...

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Fri Feb 18, 2005 11:33 pm    Post subject: Reply with quote

well i have the vds coding working put i can't get zip.exe to work right

I do have the command -i and i get this error:

notthing to select from

i do have full paths, i tried without full paths same thing Sad

so i'am not sure why i get this error Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Feb 19, 2005 4:40 pm    Post subject: Reply with quote

anyone have any ideas?

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sat Feb 19, 2005 5:00 pm    Post subject: Reply with quote

Without a little more of your working code, it's too hard to tell exacly what
is going wrong Tim.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Feb 19, 2005 7:46 pm    Post subject: Reply with quote

i think i must not have the commad right for zip.exe to added files

here is what i have for vds code



Code:

 %%Fest = @filedlg("All Files (*.*)|*.*",Add File,c:\dishhelp\*.*,MULTI)
     LIST CREATE,1
  LIST ASSIGN,1,%%fest
   %x = 0
  %%outStr =
   repeat
    %I = @item(1,%x)
    %%outStr = %%outStr%I@chr(44)
    %x = @succ(%x)
  until @equal(%x,@count(1))
   %%outStr = @substr(%%outStr,1,-1)

  info %%outStr
      LIST SAVEFILE,1,@path(%0)include.lst
 


note this just makes a file called include.1st which holds the paths of the file names that i want zip.exe to include. I was only trying to find the problem once i find out i will just do a run commad instead..

then i would runa bat file that had this in there

COMMAND.COM /c zip -r c:\test\test.zip -i@include.txt

then i would get that zip error ( that i posted above)

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sat Feb 19, 2005 9:17 pm    Post subject: Reply with quote

tim6389 wrote:

Code:

%%Fest = @filedlg("All Files (*.*)|*.*",Add File,c:\dishhelp\*.*,MULTI)
LIST CREATE,1
LIST ASSIGN,1,%%fest
%x = 0
%%outStr =
repeat
%I = @item(1,%x)
%%outStr = %%outStr%I@chr(44)
%x = @succ(%x)
until @equal(%x,@count(1))
%%outStr = @substr(%%outStr,1,-1)

info %%outStr
LIST SAVEFILE,1,@path(%0)include.lst



The '@' symbol denotes a list file to zip.exe. Instead of saving a comma
delimited string to the .1st file, you just need to save the list contents as
they are in the list normally. Then call zip.exe with the'-i@include.1st'
switch and see what happens. Wink

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group