hi,
if i extract a zip file, sometimes it has a folder in the archive, sometimes not.
After extract the structure can look like:
\pictures\pictures\001.jpg
\pictures\pictures\002.jpg
can i somehow identify such
parent and child folders with same name
and simplify the structure to:
\pictures\001.jpg
\pictures\002.jpg
Thank you!
parent and child folders with same name
Re: parent and child folders with same name
To find those folders, paste the following in the Everything search bar:
Warning: Test the following thoroughly on some dummy-data before using it on your real data.
To move the content of "c:\path to\folder1\folder1" to "c:\path to\folder1":
Code: Select all
regex:^(.*)\\([^\\]*)\\\2$
Warning: Test the following thoroughly on some dummy-data before using it on your real data.
To move the content of "c:\path to\folder1\folder1" to "c:\path to\folder1":
- Use the search mentioned above to find all "folder1\folder1" folders
- Select all folders you want to move
- Menu:Edit => Advanced => Advanced Move to Folder
(The Move To dialog will open) - Enable Regular expressions
- Old format =
^(.*)\\[^\\]*$
- New format =
\1
Example: - Check the New Full Paths
- OK
(the actual renaming will start; a Confirm Folder REplace dialog will be shown) - Click Yes for each separate folder (or enable Do this for all current items too)
- Done
Re: parent and child folders with same name
If you don't have name collisions, you can search for:
select them all
then Parent -> Paste to the (parent) \pictures\ directory.
(Or, Edit | Move to Folder...)
---
A Zip can have a (can be created with a) directory structure, or not.
You can choose to Extract without directory structure
or to eXtract with directory structure.
(Well, depending on your un-zip program. Below is from various programs.)
---
(Related, depending on a particular situation), Merge Directory Structures
\pictures\pictures\ *.jpg
select them all
then Parent -> Paste to the (parent) \pictures\ directory.
(Or, Edit | Move to Folder...)
---
A Zip can have a (can be created with a) directory structure, or not.
You can choose to Extract without directory structure
or to eXtract with directory structure.
(Well, depending on your un-zip program. Below is from various programs.)
Code: Select all
e: Extract files from archive
x: eXtract files with full pathname
e : Extract files from archive (without using directory names)
x : eXtract files with full paths
-j junk paths (do not make directories) [from unzip]
e Extract files without archived paths
x Extract files with full path
---
(Related, depending on a particular situation), Merge Directory Structures
Re: parent and child folders with same name
Hi NotNull, thank you very much!!!
Great guideline.
(Not needed to confirm the folder merge.)
Once again, thank you, you made my day!
Great guideline.
(Not needed to confirm the folder merge.)
Once again, thank you, you made my day!