Fedora :: Automatically Renaming Files While Sorting By Date?

Apr 17, 2010

I often record music from the webradio with Streamtuner.How can I rename the mp3 files recorded in a way that numbers are added to the beginning of the filename representing the order in which the titles were played on the webradio station?I am looking for an automated solution like a renaming tool since there are usually hundreds of files in a directory. I used autorename / ARen for windows back in the day when I was still on XP. What I could do with the tool was:a) Sort the files by date of creationb) add an increasing number at the beginning of the filename based on the position in the sorted list.

View 3 Replies


ADVERTISEMENT

Ubuntu :: Automatically Sorting Files?

Mar 25, 2010

I download files onto my networked file server which is running Ubuntu 9.10.By default, all files are moved into the Downloads folder, I'd like to use a script or program to automatically send them into one of 5 shared folders based on what the file is.For example: archived files would be software by default, .avi or mpeg Videos, and .flac or .ogg would be Music.

View 1 Replies View Related

Ubuntu :: Renaming Video Files Based On The Date Created

Aug 4, 2011

I have hundreds of MTS and AVI files since 2000 and would like to rename them in the following manner based on the date created: DD-MMM-YYYY HH.MM.SS_X; where X begins at 1 and increments by 1 if there are dublicate date/time stamped videos.

Ex: 19-Nov-2002 08.12.30.avi, 19-Nov-2002 08:13:30_1 and 19-Nov-2002 08:13:30_2

Someone previously wrote the following script for me, and it works great for photos. It uses EXIV2 to get the image date created info. I have tried to understand the script, but am struggling. The video files I have can use the date modified since I have not modified them since I filmed them.

#!/usr/bin/env python
import os
import stat
import pyexiv2
import time
directory = '/home/david/Desktop/test'
[Code].....

View 1 Replies View Related

SUSE :: Renaming Multiple Files - Adding Date / Time Stamp In Name

Feb 1, 2009

I am trying to rename multiple files in a directory and add the Date/Time stamp to the file name.

Example:
file1.txt
file2.txt
file3.txt

Renamed to
2009_02_01_21.txt
2009_02_02_21.txt
2009_02_03_21.txt

I am able to accomplish this using this command:
mv file1.txt "`date +%Y_%m%d_%H`".txt

But I want to automate this task, I have many files to process and I dont want to do them one by one.

I already tried this but it does not work
mv *.txt "`date +%Y_%m%d_%H`".txt

View 2 Replies View Related

Ubuntu Multimedia :: Digikam - Renaming On Import - "Create Date" Versus "File Modification Date"

Jan 24, 2011

I just switched from a basic digital camera to a more advanced one that stores both Jpeg and Raw (.Nef - it's a Nikon) files for me.When importing files in Digikam, I rename the files so that they start with Date and Time. Example: 20110121-223748.JPG for a photo taken on Jan 21st 2011 at 22:37:48.I was a bit surprised when importing both the JPEG and the Raw version of the same photo, that the filename is different by a few seconds (no constant offset, sometimes they are the same):

20110121-223748.JPG
20110121-223750.NEF

I did some "research" by looking at the exif data of both files (using "exiftool 20110121-223748.JPG" from the command line). Here is what I got back

(amongst other data):20110121-223748.JPG
File Modification Date/Time : 2011:01:21 22:37:48+01:00
Modify Date : 2011:01:21 22:37:48
Date/Time Original : 2011:01:21 22:37:48

[code]....

So it seems that Digikam is using the "File Modification Date/Time" (different in the Jpeg's and Raw's of my camera) rather than the "Create Date" (the same for both Jpeg and Raw). (The few seconds difference in "File Modification Date/Time" between the two versions of the same photo is probably due to the time that my camera needs to write away the data on the SD memory card. I guess.) Is there a way to have Digikam use the Create Date? (Or the Date/Time Original?)

PS: I'm on Ubuntu 10.04LTS, using DigiKam 1.2.0

View 1 Replies View Related

General :: Include Special Characters When Sorting Files By Name (Fedora 12 I386)?

Feb 15, 2010

I am dragging my files over to a new Fedora 12 installation and I just noticed that special characters are not taken into account when sorting files by name (I want '_js' to come before 'images').Is there a way to make the sorting process behave like Windows, where files starting with a special character are listed first?

View 5 Replies View Related

Ubuntu Multimedia :: Replace Jpg Files Last Modification Date With Timestamp Creation Date?

Sep 22, 2010

I'm looking for a method for modifying some jpg photo files last modification date with the corresponding timestamp creation date of each file.The reason is that shotwell import pictures in folders according to last modification date which is stupid on my opinion.

View 2 Replies View Related

General :: Sorting Files In A Directory?

Jan 6, 2010

I have some files in a directory like

file1.txt
file10.txt
file2.txt

[code]...

View 5 Replies View Related

Ubuntu :: Sorting Files Based On Filename?

Nov 2, 2010

I'm currently trying to organize a media server so that things will be in some kind of logical order rather than the current setup of dumping everything of a certain content type into a single folder. However, the size and diversity of content within these disorganized folders precludes me doing things manually. Does anyone know of a program or script that could sort the files into folders based on part of a filename

View 7 Replies View Related

Ubuntu :: Logical Volume Sorting Individual Files?

Jun 5, 2011

So I just had a quick question on logical volumes and such with ubuntu. I've been looking into setting up a storage array of 4 2tb hard drives for media storage in my house but have ran into a wall with with sort of array i should use, whether it be setting up a full raid system (raid 5 or 10 most likely) or using LVM for stripping. The one thing with LVM however, is that there is no parity or redundancy built into it in case 1 hard drive fails. I was wondering if it was possible to create something similar to that of LVM stripping, but instead the logical volume is sorted into whole individual files, not stripping them across the array. That way, if one drive fails, sure, i lose the contents of the one drive, but the rest of the content isn't lost and I have no loss of space because there is no inherent parity.

View 1 Replies View Related

Fedora :: Rename JPG Files To Creation Date

Sep 2, 2009

I have a list of .jpg files from two cellphones that I would like to rename to the file creation date... but so far I can't seem to find a suitable script (or anything remotely close to what I need).

These are jpg's snapped on cellphone cameras, so no EXIF data exists.

View 4 Replies View Related

General :: How To Set Debian To Automatically Update Time And Date

Aug 14, 2011

I have an old computer and BIOS counts the time slower than real. So, how can I set my OS to update the time automatically using the internet? If it updated the time only during booting, it would be enough.

View 2 Replies View Related

Ubuntu :: Renaming Files Through Bash

Feb 10, 2011

I'm trying to rename ~11000 files. What has happened is I have files in the following format:

string1_100_string2_200_string3_300.log

now the numbers 200 and 300 are sometimes below 100 and the file looks like this:

string1_100_string2_99_string3_99.log

and I want to rename such files to be like this:

string1_100_string2_099_string3_099.log

I wrote a small matlab script but it seems to take forever so thought I'd try and do it bash and have got near to nowhere....

View 3 Replies View Related

General :: What's The Command For Renaming Files

Jun 8, 2010

What's the command for renaming files? I thought it was "mv"--I typed "info" and read

Quote:

* mv: (coreutils)mv invocation. Rename files. So, desiring to give a .JPG extension to a jpeg file that had no extension (because I dug it out of my Firefox cache), I typed

Quote:

mv '/home/josh/Desktop/Natalie pictures/DEC8FFA5d01' *.jpg

That didn't rename the file; it made the file disappear from its folder. What did I do wrong?

View 6 Replies View Related

Software :: Renaming Or Copying Some Files?

Apr 19, 2011

i have some files on my server that i can not rename or copy it seems file names are some how strange for linux (centos)the names are like this way :

Spirited.Away.2001.HDRip_-_(Film98-Net).mkv
Up.2009.BRrip_-_(Film98-Net).mkv
How.To.Train.Your.Dragon.2010.720p.Bluray_-_(Film98-Net).mkv

[code]...

View 6 Replies View Related

OpenSUSE :: Date And Time Automatically Adjusted 4 Hours Back

Jun 22, 2011

I have a switch tray on my computer and I installed opensuse in one of the hard drives that I have but as I switch between the windows hard drive and opensuse the time changes all the time. For example it's 10pm right now and if I switch the hard drive to opensuse the time automatically gets adjusted 4 hours back and then I fix it and when I switch back to my windows hard drive the time goes forward 4 hours. I check both region settings and they are both set to NY Eastern time. Why is it doing this?

View 2 Replies View Related

General :: Batch Renaming Of Files In A Directory Using Sed

Dec 11, 2010

I run a script which generated about 10k files in a directory. I just discovered that there is a bug in the script which causes some filenames to have a carriage return (presumably a '' character).

I want to run a sed command to remove the carriage return from the filenames.

Anyone knows which params to pass to sed to clean up the filenames in the manner described?

I am running on Linux (Ubuntu)

The character causing the filename to 'break up' accross multiple lines appear to be a CR (carriage return) instead of ' '. The filename is being diaplayed in thetitle of a text editor with %0D in the positions of where the file name breaks up. So I need to remove the CR chars from my filenames.

View 1 Replies View Related

Ubuntu :: Renaming Downloaded Files - Adding '

Jan 11, 2011

Whenever I download a file using Firefox or Google Chrome and it has a ' character on it's filename, the file is renamed and a is added before the '. It's really annoying and I'd like to know how can I solve this issue.

View 9 Replies View Related

Ubuntu :: Renaming Files By Shotwell 'title'?

Mar 31, 2011

I've used Shotwell to give titles to a lot of photos, and now realise that I want to also rename those files using the title. I see that Shotwell saves the title into XMP IPTC structure, using this: dc:title[x]. how to batch rename a bunch of files using this data?

View 3 Replies View Related

Programming :: Bash - Renaming Files Won't Work

Apr 1, 2010

I'm trying to rename a lot of files getting rid of the space on the names. For that purpose I wrote this very simple bash script, but for some reason is not working.

Code:
for i in "$(ls)"
do
j=$(echo "$i" | sed 's/ /_/g')
mv "$i" "$j"

done But what I get in return for each line is just one long file name with all the file names concatenated. I've tried with echo -e "$i" as well with no results. This has to be something really simple that I'm missing but I just can't see it.

View 11 Replies View Related

Programming :: Renaming Files With Asian Characters?

Jul 19, 2010

I have a bunch of files that I need to rename, ordinarily this is pretty easy task. The problem here is that the file names have Chinese / Japanese characters. ie [$$$$$$$$].SOMETHING BLAH BLAH.ext Where all the "$$$$" are insert Chinese characters. The problem is that sed or perl doesn't seem to handle the Chinese characters correctly so using a regular expression like this 's/^[*.]//' which would normally work doesn't. From what I have read so far I believe these characters are double encoded UTF-8 (not 100% sure) which could be the problem. So far I've tried numerous different regex's as well as playing around with convmv to see if I could convert the filenames to just single encoded characters but I've had no luck.

View 1 Replies View Related

Ubuntu :: Conky Date Display: Automatically Change Days Of Week

Jan 2, 2011

I'd like to tweak my Conky so it automatically displays the days of the week correctly. So for example, if TODAY were Tuesday, it would look like this:

Tuesday

Wednesday

Thursday

Friday

[etc.]

And then tomorrow, *automatically*, it would look like this:

Wednesday

Thursday

Friday

[etc.]

I know I can get it to display *today's* date like this:

${time %A}

But how do I get it to display tomorrow's date?

View 1 Replies View Related

Debian Configuration :: Renaming Files In /dev//radio0 As /dev/radio

Sep 16, 2010

I have a TV/radio tuner and I installed the gkrellm-radio plugin. The plugin works fine, but, it only works with /dev/radio. I'm not sure if its safe to rename files so I just create a symlink of /dev/radio0 as /dev/radio.

It gets pretty annoying to me to have to create a symlink every time I start up my computer so I can listen to the radio. Is there a way to get linux to permanently name "/dev/radio0" as "/dev/radio"?

View 4 Replies View Related

General :: Code For Renaming Files With Prefix In Subfolders?

Feb 12, 2011

I want to rename files in multiple subfolders with a prefix (e.g., rename "file.tif" with "prefix_file.tif") and not have to be in the subfolder.

code: for f in /path/to/*; do echo mv "$f" "PRE_$f"; done

gives you this: mv /path/to/file1 PRE_/path/to/file1

instead I want this: mv /path/to/file1 /path/to/PRE_file1

View 3 Replies View Related

General :: Renaming Files In Batch With Unix RENAME?

Mar 6, 2011

I have files whose names look like this:Sim1-2_40.36.chr20_sb.foo.indel.novoalign.samSim1-2_40.36.chr20_sb.foo.indel.bwa.samWhat I want to do is to replace all indel with snp in the namesyieldingSim1-2_40.36.chr20_sb.foo.snp.novoalign.samSim1-2_40.36.chr20_sb.foo.snp.bwa.samBut why this unix command doesn't work

View 4 Replies View Related

Ubuntu :: Script For Renaming Files Giving Them The Name Of The Folder They're In?

Feb 2, 2010

I have a folder where all of my movies are placed. Each movie lies in its own folder. I want to write a script which renames all the movie files and gives them the name of the folder they are in.For example I want this file:/home/tryfon/movies/Black Irish [2007]/black.irish.dvdrip.avi to be renamed to /home/tryfon/movies/Black Irish [2007]/Black Irish [2007].aviOne issue is that the video files are of several file types (mostly avi, divx and mkv).Another issue is that some movies consist of two parts, so if a second avi file is found I would like the two (or more) files to be named like: "Black Irish [2007] CD1" and "Black Irish [2007] CD2", or if this is not possible at least notify me of the folders that contain more than one video fil

View 2 Replies View Related

Ubuntu :: Mass Renaming Files - Get Rid Of Two Extra Characters On The End

Feb 12, 2010

I have a folder with various subfolders of files. These files all have two extra characters on the end that I want to get rid of. How would I go about telling the terminal to go into X directory and every subdirectory of X directory, look for all files with the extra characters, remove them, and keep everything else the same?

View 3 Replies View Related

Ubuntu Networking :: Bulk Renaming Files On A SMB Share?

Jan 23, 2011

I have a Netgear ReadyNAS NV in the basement, that I want to use to serve up video files over my network to a TV in the living room.

Now, I have a lot of files that HandBrake encoded and it gave the files an m4v suffix. Even when the files are in a codec that the TV can handle, it refuses to load them because of this suffix... so I want to rename them all.

This is fairly simple for files on a local filesystem. I can simply cd into the directory containing the files, and do something like the commands below.

Code:
$ for a in `ls`;
> do
> stem=`echo ${a} | cut -f1 -d"."` ;
> mv ${a} ${stem}.mpg ;

[Code]....

Although there are a few smb commands available (smbstatus, smbget, etc.), I've not found any commands like smbls or smbmv.

Are there any special commands or utilities around that can do the kind of thing I'm trying to do?

View 1 Replies View Related

Ubuntu Servers :: Renaming Files Recursively From Folder

Mar 26, 2011

I'm trying to rename files recursively from a folder. I want to delete the & from every filename. i've searched the net and found the following script:

Code:
#!/bin/bash
dir=/whatever/directory
for file in `ls $dir` ; do
# ANYCASE TO UPPERCASE:
newname=`echo $file | tr '[a-z]' '[A-Z]'`
mv $dir/$file $dir/$newname
done
and changed it:

Code:
#!/bin/bash
dir=/home/test
for file in `find $dir -type f` ; do
#rename files containing &
newname=`echo $file` | tr '[&]' ''
mv $dir/$file $dir/$newname
done

But the for loop explodes the filename after each & sign, so i don't have a whole filename. if the file is named lorem & ipsum, the for loop will break it in 3 parts.

View 2 Replies View Related

Ubuntu Multimedia :: Renaming Recovered Music Files

May 18, 2011

I managed to very stupidly (and avoidably) overwrite the hard drive that contained all my stuff--music, photos, home videos from the 80's that were painstakingly converted to digital movies, etc.After running Photorec and recovering much of the data to another disk, I'd like to be able to rename the music files using whatever exif data/tags are available.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved