Navigating a Zipped Filesystem - archive

I have found that, with some file zippers like 7-Zip, it is possible to use files inside the created archives. For example, if I create a file my-zip-file.7z, containing folder my-folder, with files this-file.docx and that-file.html I can use 7zip to go into my-zip-file.7z and open the 2 files, and see or change the contents, even if the original my-folder is deleted! How is this possible?

If you look at the file path for whatever you're editing you'll see that the document is saved to a temporary folder. When you save (or possibly close) 7-Zip then updates the zip file with the saved content.

Related

How do I get previous directories and folders using PuTTY?

I created a directory root/, folder /temp and change it with emacs folder, and then add a file quote_dora. I want to add a text file to quote_dora.
I have figured it out already.
Runs emacs quote_dora
write text on quote_dora file
ctl-x and ctl-c to save and exist.

Unzip single zipped file into parts?

I have a single file that is zipped. I want to unzip this, but I don't have enough space on the computer. Is there a way to unzip it in parts? For example, first I'd want to unzip the first quarter (or x GB), then stop, look at the resulting file, delete it, and then unzip the next part. The parts do not have to fit together perfectly to form a new file.
I'm using Windows.
EDIT
The original pre-zipped file is only 1 file. This single file was zipped, and now I need to unzip it, but in parts.
Assuming it's a text file:
I'm not sure how to do this natively in Windows, but this is very easy to do under unix. You can download Cygwin which will give you access to the unix tools that can do this.
Then you can do:
/cygdrive/c/yourDisk/
$ zcat yourFile.zip | sed -n 1,1000p > file1.txt
This will give you the first thousand lines in a file in c:\yourDisk\file1.txt
Use your Windows Explorer to explore the zip file... it allows you to open subdirectories (folders) and for you to navigate anywhere within the zip as if it was a normal folder.
When you find something you want to view, either double click it, or drag it to another location in your drive. If you drag it, you will end up copying whatever you are dragging to a new location (say, your temporary work area). Note, copying is not the same as moving as the original compressed version will continue to exist within the zipped folder.
When you have finished with whatever you dragged out, you can delete it (the copy) and return to your original and pull out more data/files for inspection.
Look at my attached image... notice the directory path where I have the red arrow. It says I opened a file called myzipfile.zip (I did a right mouse button over the file and clicked Open With... and selected Windows Explorer).

How to look at the contents of a zipped folder in batch?

In this case, I have a zip folder with contents inside. How would I look into the zip folder and be able to check the file name of those files for a certain word without having to unzip the file to begin with?
So for example:
I have a zip folder with the files inside named
123456789COW.txt
123445614COW.txt
123456789ASK.txt
232436787CAT.txt
and I want to check if the file has COW inside the name.
Every solution I have found so far has assumed I know the contents already, but in my case that may not always be true and I need to check.

Running SAVE AS using a batch file

I have a batch file that creates text files in multiple folders.
What I need it to do as well, is after creating that text file, save a copy of it as a .scr file
If I were to do with this without a batch file, I would open the text file, click SAVE AS and save the file with a .scr extension. I cannot figure out how to add this feature to my batch file however.
The original text file cannot be erased, so I can't just change the extension. I would have to copy it, then change the extension, or imitate the SAVE AS feature.
Help?
I just used the ren *<> *<> command. It is extremely redundant because I end up making two text files that are identical and just changing one, but it gets the job done

copy to output directory file delete

i find that to play video files using mediaelement, we need to set the file's Copy To Ouput Directory to Copy Always. is there any option to auto delete the file from the output directory after it has been used? because if there's hundreds of video that has been played by the application, then it will take a massive amount of storage, right? because from what i seen, this copy to ouput directory will create the duplicate of the files, from it's original source path. please enlighten me
You do not need to copy the files to the output directory, you can set the source as follows:
mediaElement.Source = new Uri (System.IO.Path.Combine(dirWithVids, fileName)
,UriKind.RelativeOrAbsolute)

Resources