How to use CMD to run WinZip and open URL zip file? - url

I need to use CMD to open a zip file found on URL.
The default application to open zip file is WinZip.
I tried the below command with a local file on my PC and it runs correctly as expected:
"C:\Program Files (x86)\Winzip\WINZIP32.EXE" "C:\Users\xxxx\Desktop\Test.zip"
But, when I tried to use the command with an URL , I got a dialog window (Add to Archive):
"C:\Program Files (x86)\Winzip\WINZIP32.EXE" "http://xxxxxx/insp\Test.zip"
And this is expected window:
And this is a sample zip file (URL) https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-zip-file.zip
In advance, thanks for all your help.

Related

Cannot open Zip file after creation with tar.exe

I'm trying to use Tar.exe in a Windows 10 command prompt to zip an entire folder and its subdirectories into a .zip file.
After reading different answers on here and this online help, so far I have the following:
tar.exe -cvzf "C:\Users\Me\Desktop\Output.zip" "C:\Users\Me\Desktop\MyFolder"
This appears to work within the command prompt (no errors and all files get listed). The .zip file gets created on the Desktop but when I try to open it by double-clicking on it, I get this error:
Windows cannot open the folder.
The Compressed (zipped) Folder 'C:\Users\Me\Desktop\MyFolder' is invalid.
I dragged the file into Notepad to see if there were any headers that might uncover the problem, but it looks like some kind of oriental affair...!
Can anyone advise what I've done wrong here please?
After much deliberation, I finally opted to use 7-Zip:
"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\Users\Me\Desktop\MyFolder.zip" "C:\Users\Me\Desktop\MyFolder"
The destination machine without 7-Zip could still read the file, but more importantly, the speed of the zip creation was magnitudes faster than Windows's UI or the Tar function.

Running PY file outside of Spyder

I used to be able to double click .py file and it would proivde me CMD prompt to run the script.
At the moment I have to go into Spyder each time to run the file.
What do I need to do to be able to run outside of Spyder?
Thanks
open a terminal/cmd in the directory the file is in and then write python pythonFile.py
EDIT
alternative option, open Powershell in the directory the file is in or open powershell and navigate to the directory the file is in and use this command to source a document in the current directory ./test.py

Packaging Electron Apps with external files

In my Electron application, I have a button in which a user can click which triggers node's child_process and runs an external .jar file in the background:
exec(`java -jar encoder.jar -i filein -o fileout`, function(err, stdout, stderr)
The actual .jar file is located within the root directory of the project. When running in development mode(unpackaged) this works great. However, when I package it and run the application, I get the following error:
There was an error: Error: Unable to access jarfile encoder.jar
Am I to assume that everything in the project folder gets packaged when using electron-packager? If not, what am I missing?
look into process.resourcesPath

How to write a run script to unzip file in the project directory?

I need to create a run script that will un-zip a file a in the project source code directory and replace the existing files.
My requirement in details is like this. I have aa.framework and bb.bundle in a zip file. Zip file is in the source code directory. Now, at the run time (Each time compile the app) I want to up-zip the zip file and replace existing aa.framework file bb.bundle file with the un-zipped files.
Please help me to write a run script to do this if this is doable.
You can get the path to to your project from the environment variable PROJECT_DIR. So you just call the zip and unzip commands.
unzip "${PROJECT_DIR}/yourzip.zip"

Cannot open Selenium Jar file from CMD. Path or ClassPath issue?

I'm trying to launch:
java -jar selenium-server-standalone-2.14.0.jar -role hub
from my Command Prompt but output was as below:
C:\Program Files (x86)>java -jar selenium-server-standalone-2.14.0.jar -role hub
Unable to access jarfile selenium-server-standalone-2.14.0.jar
C:\Program Files (x86) is where the jar file is located.
I've put C:\Program Files (x86) in my PATH and CLASSPATH and it still won't work.
Your filename must be wrong. Check whether you have a file named -selenium-server-standalone-2.14.0.jar. Chances are you won't be. :)
I encountered the same issue.
The solution is that the naming convention matters.
if you have a selenium server standalone.jar file, you can rename it first
to make it look simple(example abc.jar).
1) If the jar file in your system is encountered with the .jar extension,
then after renaming, give the .jar extension.(eg abc.jar)
2) If the jar file in your system is not having the .jar extension,
then after renaming, dont provide the .jar extension(eg abc)
3)Start the hub now:
java -jar abc.jar -role hub
Regards,
Nikhil Kanojia
Unable to access the jarfile is considered as Common Error.
This error can occur when starting up either a hub or node. This means Java cannot find the selenium-server jar file. Either run the command from the directory where the selenium-server-XXXX.jar file is stored, or specify an explicit path to the jar.
Go for details here
1.goto root mode
2. install $apt install mlocate
3. locate your jar file
4. check the correct jar file name and again try to open it with specific command
5 java -jar ./selenium-server-standalone-2.14.0.jar
I had the same issue with ubuntu. Try following steps..
Go to the directory where the jar file located.
Then execute the .jar file in the directory using,
java -jar ./selenium-server-standalone-2.14.0.jar
Go to desired location in command prompt and enter the below command.
java -jar ./selenium-server-standalone-3.141.59.jar
That means if you save the .jar file in "C:\Eclipse\jar" location then the command should be:
C:\Eclipse\jar>java -jar ./selenium-server-standalone-3.141.59.jar

Resources