I need to write a batch file to unzip files to their current folder from a given root folder.
Folder 0
|----- Folder 1
| |----- File1.zip
| |----- File2.zip
| |----- File3.zip
|
|----- Folder 2
| |----- File4.zip
|
|----- Folder 3
|----- File5.zip
|----- FileN.zip
So, I wish that my batch file is launched like so:
ocd.bat /d="Folder 0"
Then, make it iterate from within the batch file through all of the subfolders to unzip the files exactly where the .zip files are located.
So here's my question:
Does the Windows (from XP at least) have a command line for its embedded zip tool? Otherwise, shall I stick to another third-party util?
AFAIK, there is not unzip tool shipped as part of Windows XP, but there is gnu unzip which will do the job nicely for you.
Related
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.
I have bunch of .class and .wsdl files which simple are not ignored by SourceTree - ignore command in the drop down menu is not active
My .gitignore file looks like
#
# Default excludes
#
# Binaries
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.war
*.ear
*.sar
*.class
# Maven
target/
# IntelliJ project files
*.iml
*.iws
*.ipr
.idea/
# Unknown
**/jaxws/*
**/wsdl/*
Any clue what is going on?
Some time has passed since you asked this question, but looking at the color of the icon on the left of your files, it looks like you have already tracked those files, therefore you can't ignore them.
First you need to choose the option Stop Tracking bellow Ignore and after that you will be able to select those files and ignore them.
My computer crashed and now Eclipse won't start. This is the workspace\.metadata\.log file: http://pastie.org/9532707
The file exists (as a relative path). I tried renaming the file, renaming the project, and running eclipse -clean, but nothing works.
I was able to restart it by finding all the binary files containing .htaccess and deleting them. I had to re-import all my projects again, but it was better than deleting the .metadata directory and having to re-install all the plugins.
$ find .metadata -type f -exec grep .htaccess {} \;
...
Binary file .metadata/.plugins/com.aptana.editor.php/1307689257 matches
Binary file .metadata/.plugins/com.aptana.editor.php/1773282562 matches
Binary file .metadata/.plugins/com.aptana.index.core/3142297851.index matches
Binary file .metadata/.plugins/org.eclipse.core.resources/.root/80.tree matches
Binary file .metadata/.plugins/org.eclipse.core.resources/.snap matches
$ rm .metadata/.plugins/com.aptana.editor.php/1307689257 .metadata/.plugins/com.aptana.editor.php/1773282562 .metadata/.plugins/com.aptana.index.core/3142297851.index .metadata/.plugins/com.aptana.index.core/3142297851.index .metadata/.plugins/org.eclipse.core.resources/.root/80.tree .metadata/.plugins/org.eclipse.core.resources/.snap
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.
I'm working with a Python-Project with several subdirectories within the source folder.
The code analysis seems to work only on scripts directly in the src folder. All scripts in subfolders are not analyzed.
I have added the top-level source folder to the PYTHONPATH. Is it necessary to add all subdirectories as well? I'm using Eclipse Indigo with PyDev 2.4.0.
Thanks for your help!
Probably your file is beneath the PYTHONPATH but not under a python package (i.e.: a python package is a folder that has an __init__.py file in it -- note that all the folders up to your module need to have that __init__.py file) or your folder is not a valid python name (in which case it's also not treated as a package -- i.e.: folders with '.', '-', etc in the name).
If that's not the case, please post a snapshot of the PyDev package explorer.
(as a general rule, subdirectories of a source folder shouldn't be set as source folders... although you can do to support some exceptional use-cases)
Your files need not to be in PYTHONPATH to be code-analyzed,at least this is true for my PyDev 2.6.0.
I only add my project(not packages) root dir to PYTHONPATH in project properties, and the files in subdirectories are analyzed.
Be be sure to check the dir names and python file names. They must be valid python identifier for it to be imported to be analyzed. It cannot contain some innocent-looking characters, like dot and dash.