Skip to main content
Tweeted twitter.com/askdifferent/status/860103920311468033
deleted 31 characters in body; edited tags; edited title
Source Link
grg
  • 205.6k
  • 45
  • 364
  • 495

How to replace a folder that's name is a date i.e. YYYYMMDD with folder hierarchy of year, month, date? mac osx

I have a list of folders which have dates for names. The dates are in the format YYYYMMDD (e.g. 20150129). Within these folders are text documents which are related to that specific date.

I would like to restructure them in a folder hierarchy going from year to month to date, and to move the text documents into the corresponding 'date' folder lower down in the hierarchy.

In other words I would like the 'root' folder to be named after the year like 2015, and then create sub-folders named with months like 01, and then create further sub-folders named with dates like 29 which hold the corresponding text documents.

So the path would look like 2015/01/29/file.txt or 2015>01>29>file.txt.

I have taken a look at Automator and it seems that something like this is not possible although I could be wrong, so I would like to know...

  1. Is there some easy solution to this problem that any layman can understand, for example an Automator workflow, or does this require some understanding of terminal commands and regular expressions?

  2. How would one solve this problem provided there is in fact a solution?

Thanks for any suggestions!

How to replace a folder that's name is a date i.e. YYYYMMDD with folder hierarchy of year, month, date? mac osx

I have a list of folders which have dates for names. The dates are in the format YYYYMMDD (e.g. 20150129). Within these folders are text documents which are related to that specific date.

I would like to restructure them in a folder hierarchy going from year to month to date, and to move the text documents into the corresponding 'date' folder lower down in the hierarchy.

In other words I would like the 'root' folder to be named after the year like 2015, and then create sub-folders named with months like 01, and then create further sub-folders named with dates like 29 which hold the corresponding text documents.

So the path would look like 2015/01/29/file.txt or 2015>01>29>file.txt.

I have taken a look at Automator and it seems that something like this is not possible although I could be wrong, so I would like to know...

  1. Is there some easy solution to this problem that any layman can understand, for example an Automator workflow, or does this require some understanding of terminal commands and regular expressions?

  2. How would one solve this problem provided there is in fact a solution?

Thanks for any suggestions!

How to replace a folder that's name is a date i.e. YYYYMMDD with folder hierarchy of year, month, date?

I have a list of folders which have dates for names. The dates are in the format YYYYMMDD (e.g. 20150129). Within these folders are text documents which are related to that specific date.

I would like to restructure them in a folder hierarchy going from year to month to date, and to move the text documents into the corresponding 'date' folder lower down in the hierarchy.

In other words I would like the 'root' folder to be named after the year like 2015, and then create sub-folders named with months like 01, and then create further sub-folders named with dates like 29 which hold the corresponding text documents.

So the path would look like 2015/01/29/file.txt or 2015>01>29>file.txt.

I have taken a look at Automator and it seems that something like this is not possible although I could be wrong, so I would like to know...

  1. Is there some easy solution to this problem that any layman can understand, for example an Automator workflow, or does this require some understanding of terminal commands and regular expressions?

  2. How would one solve this problem provided there is in fact a solution?

Source Link

How to replace a folder that's name is a date i.e. YYYYMMDD with folder hierarchy of year, month, date? mac osx

I have a list of folders which have dates for names. The dates are in the format YYYYMMDD (e.g. 20150129). Within these folders are text documents which are related to that specific date.

I would like to restructure them in a folder hierarchy going from year to month to date, and to move the text documents into the corresponding 'date' folder lower down in the hierarchy.

In other words I would like the 'root' folder to be named after the year like 2015, and then create sub-folders named with months like 01, and then create further sub-folders named with dates like 29 which hold the corresponding text documents.

So the path would look like 2015/01/29/file.txt or 2015>01>29>file.txt.

I have taken a look at Automator and it seems that something like this is not possible although I could be wrong, so I would like to know...

  1. Is there some easy solution to this problem that any layman can understand, for example an Automator workflow, or does this require some understanding of terminal commands and regular expressions?

  2. How would one solve this problem provided there is in fact a solution?

Thanks for any suggestions!