Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string not recognized in command line
#10
yes i figured that out as well found 7zip on my old win7pc and tested
A couple of notes on this, 7zip has  trouble with filenames or folder names that have spaces in them. Also you should be using 7z.exe(Command line version) with RunConsole2 as you can see the output in qm and is alot faster .7zG.exe does work but is slower and if there is problems using 7zG.exe the qm macro or function will just hang and not end. updated function below


Code:
Copy      Help
str ft ft2 foldername filename archive
;find Windows Explorer window
int hwnd=win("" "ExploreWClass")
if(!hwnd) hwnd=win("" "CabinetWClass")
if(!hwnd) end "folder window not found"
;Get ShellBrowserWindow interface by enumerating shell windows
SHDocVw.ShellWindows sw._create
SHDocVw.ShellBrowserWindow b
foreach(b sw)
,int hwnd2=b.HWND; err continue
,if(hwnd=hwnd2) goto g1
ret
;g1
;get shell folder view document
Shell32.ShellFolderView sfw=b.Document
Shell32.FolderItem fi
;enumerate selected items
int i
foreach fi sfw.SelectedItems
,if i=0
,,ft2=fi.Path
,,ft+ft2
,else
,,ft2=fi.Path
,,ft + " "
,,ft+ft2
,i + 1
;out ft
foldername="C:\Users\123\Downloads\";;location of folder of saved archive
filename="test.7z";;possible formats 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
archive.format("C:\7-Zip\7z.exe a %s%s %s" foldername filename ft)
RunConsole2 archive
out "done"
run foldername;; open folder where archive is created


Messages In This Thread
string not recognized in command line - by TNH - 07-23-2018, 11:29 PM
RE: string not recognized in command line - by Kevin - 07-24-2018, 03:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)