Support
Forums

Re: Changing date format in filenames in Linux

Ah, so restart is necessary in MX - OK.

QuoteUpdate2. I just tried to copy and paste your script into the scripts folder but it won't let me! Nothing happens.

The script has to be pasted into a text document.  So:
1. copy this script:
[code]#!/bin/bash
> dd-mm-yyyy.mp3
for file in $(ls -1 *.mp3); do
 day=$(echo $file | cut -d "-" -f 1)
 month=$(echo $file | cut -d "-" -f 2)
 year=$(echo $file | cut -d "-" -f 3 | cut -d "." -f 1)
 suffix=$(echo $file...
Ah, so restart is necessary in MX - OK.

QuoteUpdate2. I just tried to copy and paste your script into the scripts folder but it won't let me! Nothing happens.

The script has to be pasted into a text document.  So:
1. copy this script:
[code]#!/bin/bash
> dd-mm-yyyy.mp3
for file in $(ls -1 *.mp3); do
 day=$(echo $file | cut -d "-" -f 1)
 month=$(echo $file | cut -d "-" -f 2)
 year=$(echo $file | cut -d "-" -f 3 | cut -d "." -f 1)
 suffix=$(echo $file...