Mailinglist Archive: opensuse (2912 mails)

< Previous Next >
Script to create folders and move files.
  • From: Rikard Johnels <rikjoh@xxxxxxxxx>
  • Date: Thu, 3 Feb 2005 01:06:16 +0100
  • Message-id: <200502030106.16790.rikjoh@xxxxxxxxx>
Hi all.

I need pointers on either where to find help on, or help with a script to
create numbered folders.
I want to create folders according to the standard;
"dd-mm-yyyy-xx" where "dd" is day, "mm" is month, "yyyy" is year and xx is a
running number. If one folder "-01" exists the script checks for "-02" etc.

Its to transfer all images from a flashcard

Here's what i want it to do

(Automount of a USB disk. ( /mnt/sda(x) )

check where it is mounted ( sda(x) )
mkdir /mnt/sda(x)/backup/<dated foldername>
cp /mnt/sda1/drive/files/* /mnt/backup/<dated foldername>/*
rm /mnt/sda1/drive/files/*

It really doesnt matter if its in Bash, Perl or whatever.
Anything goes as long as it works.



Rikard Johnels email : rikjoh@xxxxxxxxx
Web :
Mob : +46 735 05 51 01
PGP : 0x461CEE56

< Previous Next >