Cannot open Zip file after creation with tar.exe - tar

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.

Related

Could not locate zlibwapi.dll. Please make sure it is in your library path

I am working on a object detection project and wanting to process the project with my GPU. I have completed the NVIDIA setup tutorial and everything works fine. My object detection code originally works with the CPU, however when I add these two lines of code:
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
the output displayed:
Could not locate zlibwapi.dll. Please make sure it is in your library path!
I have downloaded the zlibwapi.dll zip file stated from the cuDNN website, unzip and added the whole folder into my environment variables paths. The folder is called "zlib123dllx64" containing a "dll_x64" folder and a "static_x64" folder. The "zlibwapi.dll" is inside the "dll_x64" folder. I have added the "zlib123dllx64" folder in the user and system path variable but it doesn't seem to fix any of the problems. How can I fix this error and make the GPU work with the code?
My environment setup:
Windows 10
Visual studio community 2019
OpenCV Python yolov3
Windows Environment:
I faced this issue of "Could not locate zlibwapi.dll. Please make sure it is in your library path" when I am trying to run a TensorRT sample, int8_caffe_mnist. To confirm proper installation of TensorRT.
Following the instructions from: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#prerequisites-windows
Under 3.1.3 download zlib and add the path to the environment variables.
I did the following:
Windows search for Edit the system environment variables
Add library path, Environment Variables -> Path -> Edit -> C:path to\zlibwapi.dll
Conclusion:
Following the instructions for adding zlibwapi.dll to the path did not work for me.
Solution that worked for me:
Removed the library path under Environment variables
copied zlibwapi.dll to C:\Windows\System32 and C:\Windows\SysWOW64
Either delete/keep zlib123dllx64 file, I choose to delete as it does not need the location to library path
I was able to find a copy of the missing zlib DLL in the NVIDIA Nsight directory:
C:\Program Files\NVIDIA Corporation\Nsight Systems 2022.4.2\host-windows-x64\zlib.dll
I copied and renamed it to:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\zlibwapi.dll
since that was already in my PATH environment variable. Doing that resolved my error.
I saw the link in the CUDNN documentation that was linked in the other answers, but I was a little concerned by the security warnings.
Stumbled across this problem too and there is an easy fix that immediately worked for me:
Check out Nvidia's page (exact link where to download) and download.
Extract the files and simply find the single file "zlibwapi.dll". Copy this file to
C:/path to/NVIDIA GPU Computing Toolkit / CUDA/ v11.X / bin -> right here in that folder
Just did those two steps and it's TF can properly use GPU.
Download and extract the zlib package from http://www.winimage.com/zLibDll/zlib123dllx64.zip for 64 bit windows then copy the zlibdll file into cudnn/bin
If anyone also got the same problem as me, I managed to fix the problem. Instead of calling the whole "zlib123dllx64" folder into the system environment path, you simply just add the "zlibwapi.dll" inside the "dllx64" folder into your project folder and include it in your project. This fixed my problem. cheers
Didn't find zlibwapi.dll in bin but solved it anyhow.
Since I didn't have it in
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\
I couldn't change environment variable but I found it elsewhere.
mhartlove suggested here:
https://forums.developer.nvidia.com/t/could-not-load-library-cudnn-cnn-infer64-8-dll-error-code-193/218437/17
Solution:
"I found a copy of the 64 bit zlibwapi.dll hiding under a different name in:
C:\Program Files\NVIDIA Corporation\Nsight Systems 2022.4.2\host-windows-x64\zlib.dll
I copied and renamed it to:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\zlibwapi.dll
since that folder is already in my PATH variable; and it worked. Turns out the CUDA Toolkit already has the file you need elsewhere. Seems like they could save a lot of trouble if they just made a change to the CUDA Toolkit installer.
"
I downloaded the dll file from https://www.dllme.com/getfile.php?file=38308&id=9b45296e316cdf31b9bace739e22ca7a
Extracted it
see here
renamed
zlibwapi_x64.dll -> zlibwapi.dll
and pasted it in the bin of my CUDA
Look at the last file
This worked for me....

Wampserver sql dump

I know this has been asked many times before. But I am getting a:
The mbstring extension is missing. Please check your PHP configuration.
First off I am using WanmpServer3.0.0 64 on a Win7 64 VM.
-I tried editing the php.ini file to give an absolute path to no avail
-made sure that the extension=phpmbstring.dll is uncommented
Another problem is that i noticed that whenever i load a php page it has fatal errors for my mysql commands.
When I use the wampmanager from the tray to open the php.ini file instead of through windows explorer I get:
Cannot find the C:\wamp64\bin\apache\apache2.4.17\bin\php.ini file. Do you want to create a new file?
So now I'm thinking something has gone drastically wrong and would like to uninstall/reinstall Wamp. I attempt to use the mysql console to save my databases before deleting the wamp directory. However when I run a mysqldump -all-databases > all_database.sql it just drops down to an empty line and nothing happens.
mysql console screenshot
If I browse around in the C:\wamp64 directory i find the "data" directory within \bin\mysql where it seems all of my databases reside but not in readable form.
Is there anyway to save my databases??
BTW: This whole setup was working fine previously, so I'm not sure what caused the crash and burn.
Was able to figure it out.
I opened the php.ini file from the PHP bin folder and copied all of the contents into a new php.ini file to reside in the apache bin file.
Now everything works again.
I'm not sure this is how wampserver is supposed to work or what changed to start the problem but it's pseudo-resolved now.

LuaEdit can't find module when Lua files all in the same folder

I downloaded LuaEdit to use as an IDE and debug tool however I'm having trouble using it for even the simplest things. I've created a solution with 2 files in it, all of which are stored in the same folder. My files are as follows:
--startup.lua
require("foo")
test("Testing", "testing", "one, two, three")
--foo.lua
foo = {}
print("In foo.lua")
function test(a,b,c) print(a,b,c) end
This works fine when in my C++ compiler when accessed through some embed code, however when I attempt to use the same code in LuaEdit, it crashes on line 3 require("foo") with an error stating:
module 'foo' not found:
no field package.preload['foo']
no file 'C:\Program Files (x86)\LuaEdit 2010\lua\foo.lua'
no file 'C:\Program Files (x86)\LuaEdit 2010\lua\foo\init.lua'
no file 'C:\Program Files (x86)\LuaEdit 2010\foo.lua'
no file 'C:\Program Files (x86)\LuaEdit 2010\foo\init.lua'
no file '.\foo.lua'
no file 'C:\Program Files (x86)\LuaEdit 2010\foo.dll'
no file 'C:\Program Files (x86)\LuaEdit 2010\loadall.dll'
no file '.\battle.dll'
I have also tried creating these files prior to adding them to a solution and still get the same error. Is there some setting I'm missing? It would be great to have an IDE/debugger but it's useless to me if it can't run linked functions.
The issue is probably that your Lua files are not on the path in package.path (for C files this is package.cpath).
My guess is that the LuaEdit program is not launched in the directory you have your files in, and hence does not have a match for eg .\foo.lua.
You have 3 simple solutions to this (from dumb to smarter):
Find out what path LuaEdit considers as ./ and put your files there.
Open up a terminal in the right directory (the one containing your files), and run LuaEdit from there.
Add the path the files are on to package.path and package.cpath before doing any require's
You may need to put:
lua
package.path = package.path..";c:/path/to/my/files/?.lua"
at the beginning of your files before any require (as jpjacobs indicated). I couldn't find any way to provide this from LuaEdit itself. It appears it runs the script using its full path, but keeps its current dir set to whatever it was when the IDE was started. If you run LuaEdit using full path from your application folder, it should work fine even without package.path changes.
While the IDE itself works fine with its own modules/libraries, it doesn't mean it makes them available to the application it runs.
(shameless plug) If you're still not happy with LuaEdit, I'd offer ZeroBrane Studio Lua IDE as an alternative, It's based on the same wxLua framework, but provides a bit more functionality and doesn't have this particular issue you're facing. It also supports remote debugging, so you should be able to debug your Lua scripts directly from your application.

How to prepare a file for MacOSX that will be extracted to specific directory and nowhere else?

We are running an business where we are preparing email stationeries for people. We want to make life easier for our Mac users to install their stationery in their mail application. The way we are doing that now is:
1. Prepare a zip file
2. Contact client, send a file, tell him where to extract that, repair any results of miscommunication and so on
We want to cut both points and allow him to go to our website, click a link and download an installer file, or self extracting zip, or whatever else that after double click will be extracted to appropriate path. Path is constant, it can be contained in some configuration file or even compiled with bytecode.
I've tried preparing a custom package and self-extracting zip archives without a success (in both cases there was a tiny details that made it impossible to get a result using that method). Do you guys have any other ideas?
Here's some completely untested bash code you could have them run to download and unzip a file.
#!/bin/bash
cd ~/Downloads
wget http://www.yourserver.com/coolfiles.zip
unzip coolfiles.zip -d /path/to/installation/place
rm coolfiles.zip

FTP zip upload and unpack

Hi Alsways uploading made web-sites , projects, I want to make such thing
make zip file,
upload one file
and then extract with default CHMOD for folders lets say 755 and for files 664
With Cpanel hostings its OK, I can do it via file manager... But for hostings without I can't.
Baybe someone can give a hint how...????
I use php unzipper. Here is quick tutorial on it.
Tutorial
The FTP protocol doesn't allow for such a thing.
Sometimes I keep a locked down directory where I drop compressed files and I have a little PHP script that unzips them by doing glob("*.zip") to get all the files, and executing the unzip on them.
My "solution" does require the ability to execute commands, but if you're in a more restricted environment you can use PHP's zip_ functions or even a PEAR package.

Resources