TOM
TOM

Reputation: 881

How to create current date folder from ffmpeg command

I am writing a code for ffmpeg command .But i want the value to be stored in current date folder . is there any way to create current date folder in ffmpeg command . not in Batch files .

Upvotes: 2

Views: 1856

Answers (1)

Rolwin Crasta
Rolwin Crasta

Reputation: 4339

try this

#!/bin/bash

now=$(date +"%m_%d_%Y")
outdir=/pathtodirectory/$now

if [[ ! -d "$outdir" ]]; then
  mkdir -p "$outdir"
fi

ffmpeg -i input "$outdir"/output

Upvotes: 1

Related Questions