Skip to main content
added 166 characters in body
Source Link

I have 500000 files in a folder and want to move them to subfolders. These subfolders should be created automatically.

The pattern is {prefix}-{date}T{time}-{suffix}.

The folder structure should look like {date}/{time}/{suffix}.

I have managed to remove the prefix with a bash script:

    #!/bin/bash
    for f in prefix-* ; do
        mv "$f" "${f/prefix-}"
    done

I have 500000 files in a folder and want to move them to subfolders. These subfolders should be created automatically.

The pattern is {prefix}-{date}T{time}-{suffix}.

The folder structure should look like {date}/{time}/{suffix}.

I have 500000 files in a folder and want to move them to subfolders. These subfolders should be created automatically.

The pattern is {prefix}-{date}T{time}-{suffix}.

The folder structure should look like {date}/{time}/{suffix}.

I have managed to remove the prefix with a bash script:

    #!/bin/bash
    for f in prefix-* ; do
        mv "$f" "${f/prefix-}"
    done
Source Link

Batch rename files, create subfolders and move files by pattern

I have 500000 files in a folder and want to move them to subfolders. These subfolders should be created automatically.

The pattern is {prefix}-{date}T{time}-{suffix}.

The folder structure should look like {date}/{time}/{suffix}.