Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string not recognized in command line
#1
Hi
I am trying to use 7zip with QM.I would like to zip selected files from file explorer. I created a string with the paths.

str ft

I checked the string during the process  , it looks good.
When i put the whole path in the command line the zip file is correct.

RunConsole2 "C:\7-Zip\7zg.exe a C:\Users\123\Downloads\test.7z C:\Users\123\Downloads\wn.txt"

When I  substitute the whole path with the string in the command line it is creating an empty zip file.

RunConsole2 "C:\7-Zip\7zg.exe a C:\Users\123\Downloads\test.7z ft"

I am attaching the macro.
Can somebody help me please?
Thanks
TNH

str ft
 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
foreach fi sfw.SelectedItems
fi.Path
ft.addline(fi.Path)
out ft
RunConsole2 "C:\7-Zip\7zg.exe a C:\Users\123\Downloads\test.7z ft"


Messages In This Thread
string not recognized in command line - by TNH - 07-23-2018, 11:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)