PowerShell extract the content of subfolder (all files and folders) of zip archive - powershell

I have a zipped folder named install and I need to extract a content of that folder (all files and folders) to some other destination using power shell. I tried to do the following:
Expand-Archive -LiteralPath C:\temp\install.zip -DestinationPath C:\"Program Files"\mbeats
In this case I extract install folder itself into mbeats folder, not the content of install folder.
Any idea how to fix this?
Thanks, Dragan

If your zip file - called "install.zip" - contains a folder - called "install" - that contains the folders and files you are interested in, then your observation is indeed the intended behaviour. Keep in mind that you do not have to put all files into a folder ("install") before archiving them into a zip file ("install.zip").
If you do not want to extract your whole zip archive, but all files and folders inside the folder "install", then you have to access those items piece by piece, like described here.

Related

Root file properties

I followed this help page to add folder to a features based product. In build.properties file I added:
root=iwrepo
'iwrepo' corresponds to a folder with sub-folders residing in a feature where the above mentioned properties file is. After the build, I get only folders under 'iwrepo' folder moved to Eclipse install directory (annogen,antlr, etc), not what I expected - 'iwrepo' folder with its sub-folders.
What am I doing wrong?
As per documentation
Similar to the "root" and "root." properties, except that instead of being copied into the root of the eclipse install, files and folders are instead copied into the given subfolder.
Instead of root=iwrepo, I need to use root.folder.iwrepo=iwrepo. This correctly subfolders folders under iwrepo.

Xcode - build setting "EXCLUDED_SOURCE_FILE_NAMES" not working

I am trying to exclude some .swift and .storyboard files from my project (Xcode9) for release build using EXCLUDED_SOURCE_FILE_NAMES.
But its not working for me.
Is it possible to give any folder name to exclude it completely?
How to give multiple files and folder name?
It is not working if I give path like ../ForlderName/*.
Folder is at the same level as my project.
Is it possible to exclude sub-folders files as well?
I am able to exclude if my hierarchy is
MyProject Folder
|_
MyProject Folder
|_FolderToBeExcluded
If I gave FolderToBeExcluded/* it is working but file in FolderToBeExcluded's subfolders are not getting excluded.
If my heirachy is like this (ie folder to be excluded and project folder both at same level)
FolderToBeExcluded
MyProject Folder
|_
MyProject Folder
If I give ../FolderToBeExcluded/
or $(SRCROOT)/../FolderToBeExcluded/
both are not working
If I give directly any one of the file name which is to be excluded it is getting exclude without giving full path.
Is it the limitation of EXCLUDED_SOURCE_FILE_NAMES?
If I gave FolderToBeExcluded/* it is working but file in FolderToBeExcluded's subfolders are not getting excluded.
The reason subfolders are not excluded is because of the /*. That tells it to look for files in FolderToBeExcluded. If you just give FolderToBeExcluded (no slash after) then it will exclude all files in that folder and all subfolders. At least that is what I found.
An important gotcha I ran into today is that you can't exclude files within a folder reference, but you can exclude an entire referenced folder.
When you add a folder to Xcode it will ask you if you want to create a group or create a folder reference. If you choose the second option, then you'll need to be aware that you can't exclude files within the folder, but you can exclude the entire folder.
For me it worked if I define the value of EXCLUDED_SOURCE_FILE_NAMES like this:
$(SRCROOT)/../FolderToBeExcluded/*.*
I am using Xcode 9.4.1
This seems to be the only solution:
Use groups without folders for every subfolder in excluded directory
Exclude ${PROJECT_DIR}/{Path to Excluded Folder}/* in EXCLUDED_SOURCE_FILE_NAMES settings

Prevent eclipse from renaming multiple files

I am using eclipse for a project that has multiple XML files in separate folders.
For example:
Folder A
1.xml
2.xml
3.xml
Folder A_Large
1_large.xml
2_large.xml
3.xml
If I rename A_Large/3.xml to 3_large.xml it will rename both instances of 3.xml leaving me with:
Folder A
1.xml
2.xml
3_large.xml
Folder A_Large
1_large.xml
2_large.xml
3_large.xml
I know I can hit Preview on the renaming dialog and specify what files will be renamed, but it never used to rename files like this, I must have changed some option.
How do I prevent eclipse from doing this?
Select your file you wanna rename, go to Refactor >> Rename , it should rename only that file.

XCode - copying localy all external files linked into the project

When I made my project, I've added many files just by link, without copying them into the project folder. But now, I'd like to have a pack that include all the necessary files into the project folder.
How can I make all those external files being copied into the project folder without having to check them one by one ?
Simply
Delete all the files from your project.
Geather all the files you want to copy.
Drag them all together to your project again, and now check the "Copy item to the destination folder"
I believe this is the fastest way to do this.

need suggession for access file

In my app i have one use case "Download Folder(s)" from web server this folder is in zip format.
This folder contains : text files and more zip folder(s)
So my Question is
should i just download this folder and user will manage it by himself(like unzip it and open files)
OR
Should I make view like table and put folder name which are downloaded recently(just names no unzip and no open files)
OR
folder name in table format and if user press on any folder name(i.e cell in table) unzip folder and new view (table view) with file names and zip folder(as main folder contains both files and zip folder in it) (here unzip but not open files)
OR
Option 3 unzip all files and folder and if user click on any specific file open that files(unzip and open files)
right now i am just doing option 1.
also I am doing my master project so the answers from experience users will help me a lot
Thank you
I agree with AAAAAAAAA - number 3 in the minimum I would expect the app to do.
Ideally, you should unzip when they press a file and display the contents but don't open any files automatically.
However, if they press on a file that is unzipped already, you should try to open it - don't open them automatically when you unzip, open them when the user asks for it to be opened :)