[Plain File Mode] Duplicate Folder Structure only

Support for macOS users
Post Reply
Ken11
Posts: 1
Joined: 29 Nov 2022, 22:25

[Plain File Mode] Duplicate Folder Structure only

Post by Ken11 »

Been trying a bunch formats, but I can't manage to duplicate the folder structure only, without copying the full directory. Using the regex match bindings don't work either. It's probably the naming format, or the syntax of my regex matches that are returning errors, but I can't figure it out. Please help!

I am trying to simply duplicate a file structure inside a different parent folder.
The resulting structure will have multiple sub-folders, of different levels like this:

Folder1
Folder2
↳subfolder2.1
Folder3
↳subfolder3.1
↳↳subfolder3.1.1
↳subfolder3.2

But I can't do more than one level at a time. Is there a way to remove the beginning of a pathname, just duplicating a folder structure in another location?
User avatar
rednoah
The Source
Posts: 23469
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Plain File Mode] Duplicate Folder Structure only

Post by rednoah »

:?: What have you tried so far? What Plain File Format have you come up with that doesn't quite work yet?


:?: Can you share the sample file paths you are testing with? (NOTE: make sure to include input file paths and corresponding desired output paths; specific examples are most useful)


:idea: You can load files into FileBot and then press F7 to copy file paths as text into the clipboard for easy sharing.


:idea: You can use the {folder} to access the current folder path, and {f} will give you the file path, and then take bits and pieces from there as needed:

Code: Select all

{f}

Code: Select all

{f.name}

Code: Select all

{f.tail}

Code: Select all

{f.tail.tail}

Code: Select all

{f.dir}

Code: Select all

{f.dir.dir}

Code: Select all

{f[1]}

Code: Select all

{f[2]}

Code: Select all

{f[1..3]}

Code: Select all

{f[-3..-1]}
And so on. The exact code depends on your exact use case. The possibilities are infinite so we'll leave it at that for now.
:idea: Please read the FAQ and How to Request Help.
Post Reply