I try to zip a file via CMD in the below folders and files.
META-INF -> Folder
OPS -> Folder
mimetype -> File without any extension
I have placed my cmd code for your reference.
7z a mimetype.epub
Please advise me, how to solve this.
Follow the below steps it will be help for you
Step 1:
META-INF
OPS
mimetyp
This is the folder structure right.
step 2:
Select all one by one with order and right click the mouse button
Goto the send to --> compressed (zipped) folder
step 3:
Creating zip file the filname of mimetype.zip
step 4:
Rename the mimetype.zip to mimetype.epub
Related
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.
I've been trying to add additional functionality to the electron installer, where I copy some files that are packaged inside the installer, but I receive a non-descriptive error when I try to compile my electron project to create the installer i.e. I get:
* writing effective config
* packaging
* building
x [object Object]
Here is what my script looks like:
!macro customInstall
Rename "$APPDATA\myfolder\img" "$APPDATA\myfolder\img-old"
SetOutPath "$APPDATA\myfolder"
File /nonfatal /a /r "additional_files\*"
CreateShortcut "$SMSTARTUP\mylink.lnk" "$INSTDIR\mylink.exe"
!macroend
Basically everything works except the file copy part. When I remove that part the project builds and compiles into an installer with no problems.
I've also tried to use CopyFiles instead of SetOutPath and File and it works as expected when I place the additional_files folder into the same folder as the installation (dist folder), but I want the folder to be packaged inside the installer. However, I cannot get the additional_files to be packaged with the installation.
I believe it's a location issue, that is, that the NSIS script cannot locate the additional_files/ folder. I've tried modifying the package.json file by adding to the files section the additional_files/ folder and placing it in the root of the project.
I've even tried placing it in the build folder where my installer.nsh script resides, but with no luck.
File looks for files relative to the directory where the .nsi is by default. /NOCD can be used to prevent that but I'm not sure if electron uses that switch.
!cd can be used inside a script to change the directory but I'm not sure if that is going to help you much in this case unless you are willing to use a absolute path and in that case you could just use the absolute path with the File instruction instead.
If you only know where your .nsh file is I suppose you could try File /r "${__FILEDIR__}\additional_files\*"
if you are using electron-builder you have two options inside the settings
extraResources this will copy files into the $INST_DIR/resources folder in your app (this is where the app.asar file is too), and you can access via process.resourcesPath, ex:
extraResources: [
{ from: './dist/ThirdPartyNotices.txt', to: 'ThirdPartyNotices.txt' },
]
extraFiles this would do the same but place the files into the $INST_DIR root folder of your installation ex:
extraFiles: [
{ from: './distrib/mytool.exe', to: 'mytool.exe' },
],
to get the root folder you can use something like remote.app.getAppPath().replace('resources\\app.asar', '').replace('resources/app.asar', '');
all info on: https://www.electron.build/configuration/configuration#overridable-per-platform-options
I always read that I need to create a .tfignore file for TFS to exclude my selection of files.
But what's the actual name of the file? If I'm trying to rename an empty file to .tfignore, File Explorer tells me that the file is required to have a file name, not just an extension.
So what's a valid example for a valid .tfignore file?
I was just struggling with the same issue. I found that if you create the file with the name .tfignore. (note the . at the end it recognizes that before the last "." is the filename. When it is created/renamed, the last "." will go away.
Open a command prompt.
CD to the directory you want to create the .tfignore file in (i.e. the solution root)
Type "echo > .tfignore". This will create a blank file you can then edit.
Iam using Jenkins to build my project. In build.xml, I have written the following code to copy the files from src to dest folder...
<copydir src="../image_files/Ace/drawable-hdpi" dest="../IgnitorACE/res/drawable-hdpi"/>
The problem is that, in src having the only two image files with same name as in dest folder but the pattern/design of images are differnt. So, whenever i run my build, jenkins has to copy and replace the image files with new image but same name.
The above command is working but getting warning as
[copydir] DEPRECATED - The copydir task is deprecated. Use copy instead.
[copydir] Copying 2 files to /var/lib/jenkins/workspace/Ace Build/IgnitorACE/res/drawable-hdpi
So, any solution will be appreciated.
Thanks
As the warning clearly states that [copydir] DEPRECATED - The copydir task is deprecated. Use copy instead, you should use copy instead of copydir command.
So, instead of
<copydir src="../image_files/Ace/drawable-hdpi" dest="../IgnitorACE/res/drawable-hdpi"/>
use
<copy file="../image_files/Ace/drawable-hdpi" tofile="../IgnitorACE/res/drawable-hdpi"/>
Also go through the official link for more details.
This MEAN-stack tutorial describes using Bower to install AngularJS in your public folder. One of the steps describes creating a file called ".bowerrc" in your test-app folder. However, Windows won't let you create a file without a name. How do I accomplish this on a Windows system?
on the command line (make sure to cd into your working directory), issue this command:
touch .bowerrc
This will also work for other files common to webdev like .htaccess and .gitignore
Note: If you haven't installed git bash for windows, you may not have support for the touch command. In that case (as mentioned in one of the comments here), the easiest way to accomplish this is via the cli with:
echo "" > .bowerrc
To create a file that starts with a "." in Windows, you just need to add a trailing ".".
So, simply name your file ".bowerrc." instead of ".bowerrc".
See https://superuser.com/questions/64471/create-rename-a-file-folder-that-begins-with-a-dot-in-windows for more information and more detailed solution if this doesn't work for you.
Another way to accomplish this is through Notepad++.
Create the file in Notepad++
Set the encoding to "Encoding in ANSI" (click "Encoding" in the menu bar)
Save the file as .bowerrc (change the "Save as type:" to . which is one list item up from *.txt)
Simply rename the file you created:
C:\project> ren bowerrc .bowerrc