Ubuntu :: Command / Script To Rename Files In Datetime Order?
Jun 1, 2010
I'm trying to rename all files in a folder as such:
1.jpg
2.jpg
3.jpg
Renaming them is no problem, the problem I have is, they need to be in order of the datetime that they were taken, so that the 1.jpg would be the oldest file there. The difference in filetimes is going to be very small, around 3 or 4 tenths of a second.
The reason I need to do this is that I have another script (not quite finished yet), that takes the next three files in a loop and applies qtpfsgui to them to output an HDR image to another folder, then move on to 4,5 & 6, and: repeat.
View 9 Replies
ADVERTISEMENT
Dec 1, 2010
possible to rename a list of files in batch in order to maintain the last part of them, then purge a central section and then again maintain the extension?I.E.:
Code:
file01.qwertyuiop.txt
file02.asdfghjklmnbvzxcqwertyuiop.txt
[code]....
View 7 Replies
View Related
Oct 21, 2010
I am trying to write a bash script that will extract a .cbr (.rar) file, traverse the extracted files in alphabetical order and rename them 001.JPG, 002.JPG, 003.JPG, etc.So far I only have this much to extract it:
Code:
#!/bin/bash
#
[code]....
View 8 Replies
View Related
Jul 25, 2011
How would I rename all files with a leading decimal point recursivley? I some how got all my music files to have a decimal point.I tried the below and got a " sed argument to long".[CODE]find /media/MUSIC -type f -name "*.wma" | xargs -0 sed -i 's/.(.*)/1/'[CODE]
Another question, can i just use -type f with out -name ? I am sure that all the files got the decimal point added as the first character.
View 14 Replies
View Related
Dec 22, 2009
What is the ssh commands to rename a group of files?
I need to rename:
avatar_01.jpg
avatar_02.jpg
[code]....
View 5 Replies
View Related
Apr 30, 2009
I have a bunch of mislabeled files among other things but I'll start with this first. as using the command line to fix this issue.
View 5 Replies
View Related
Feb 18, 2010
Suppose I have the following files:
1132_1_fr.mp3
1132_2_fr.mp3
1132_3_fr.mp3
.
.
.
1132_3_fr.mp3
[Code].....
So I want to add PD_ to those who dont have this preindex and get rid of _fr.
basically rename files in a same directory!!
View 6 Replies
View Related
May 7, 2011
I have a bunch of images named:
1.jpg
2.jpg
317.jpg
317 (2)a.jpg
etc.
In my file browser (Nautilus), they are displayed in the correct numerical order. However, in Brasero when I order them, it orders them strangely (correctly, but not the way I want them to). They order like this:
1
10
100
101
[Code].....
Can someone recommend a naming convention to rename all these files to so they are in the correct order (for example, cameras use IMG_xxxx.JPG, which is nice)?
Can someone give me a Linux command line rename command for these files so they are renamed to display and therefore burn in the correct order?
They're standard JPEG files, so ordering them by the date in the EXIF data might work. I just need the correct commands, or GUI - I don't mind - to get them in order.
View 3 Replies
View Related
Oct 2, 2010
I'm currently running Meerkat beta AMD64. I've been using Audacious in Ubuntu for years, before that I used XMMS.
In Windoze I used to use Winamp. Winamp has a plugin called gen_yar. Gen_yar would allow you to right-click on the playlist and copy your current playlist files in track order to any folder on your hard drive, or to a USB mounted mp3 player/thumb drive, whatever.
It had several checkboxes in the settings.
1) Rename the files adding the track number as the prefix (01_, 02_, etc).
2) Create a .m3u playlist of the tracks in that new folder using #EXTINF: instead of the full path. That way I can copy that folder to any gadget or another computer and the playlist will still play those files.
Here is the Winamp Plugin: gen_yar (Yar-matey!_Playlist_Copier) [URL] There's a link to the source code at the bottom of that site if that helps.
Here's another: Winamp Plugin Save Playlist In Order [URL]
I have yet to see this feature in any Linux media software. I've tried just about all of them. The only thing close would be drag-n-drop playlist files from Rhythmbox.
Does anybody know of a plugin for Audacious or Rhythmbox that will do this?
Alternatively, is there a Nautilus script that when I right click on a folder full of mp3s, it will create a playlist of files in that folder, and save that playlist file inside the folder (without the full paths as mentioned above)?
I hate having to boot into Virtual Box just to use Winamp to create portable playlists.
View 7 Replies
View Related
Aug 18, 2010
in my text file of 5 columns 2 column is in DDMMYYYY format. (ie DATE OF BIRTH). how to use sort command for its ascending order and descending order.
Is the same can be use for the date format YYYYMMDD ?
View 3 Replies
View Related
Jan 12, 2011
I have bought an external usb hard drive on which I back up my three computers every once in a while.Space will quickly be used up.I can't find that little bit of research that I need yesterday.Here is what I would like to find:An application that eliminates doubles in identical files and renames files that have changed by appending the last saved date yyyymmdd to the file name.Does such an application already exist?
View 6 Replies
View Related
May 7, 2009
Until now i haven't had to dabble with bash scripts.
I have a program that reads in data files. These are named datafile01_R, datafile01_G, datafile01_B, they then increment, so datafile02_R etc i have about 600 of these. the program reads in 3 data sets at a time from each run, so files_01 r, g, and b.
The program then does its magic, and outputs about 40 different files, depending on the file, they gone to folders named R, G, B, psa, or tracking.
The program itself has configuration files to say where the files should gone when analyzed, there is also the config files that reads in the data sets.
At the moment i have to run one set of data, then go in and manually change the input file location, and run again. But, doing this, even though a different data set, the new set overwrites the old set in one of the output folders. So i need a way to increment the output filenames after they are written and before the program is run again with the new data set.
View 1 Replies
View Related
Mar 14, 2011
In a moment of madness I decided to reorganise my mp3 player. I am putting everything into one folder (called 'all'), but first I am renaming the files to the following format:
artist ## songtitle
where ## is a number like 01, 02. This has been pretty straightforward with the songs that already started with a number, because then I could just
rename 's/(dd)/artist $1/' *.mp3
but I have a problem with those tracks that don't already have the track-numbers at the beginning. I suppose what I am asking is: can I turn
All Along the Watchtower.mp3
Purple Haze.mp3
Hey Joe.mp3
into
01 All Along the Watchtower.mp3
02 Purple Haze.mp3
03 Hey Joe.mp3
View 1 Replies
View Related
Jan 2, 2010
the VBO file that i want to burn into a dvd is around 7.9 gb. i want to know if it's possible to split them in order to burn the files into two diferent dvds.
View 5 Replies
View Related
Jul 8, 2011
Im trying to auto rename badly named mp3's using info from the id3 tag. I got a nice little program called id3ren, it works fine apart from it doesn't add the track number. Cant figure how to enable this function. The track numbers are in the ID3, but it just renames to Artist/Trackname. Any other users on here?
View 9 Replies
View Related
Oct 16, 2010
What's the zypper command to rename a repository name? Not yast.
View 6 Replies
View Related
Apr 14, 2010
I'm trying to clean up some files and I've been using the rename command as its the easiest way I've found to do it. One problem I've found is that on a couple of batches of files they have a set random numbers on them which I need to remove.
Only problem is I can't find a way for rename to "lock" onto those numbers to remove them. The file name structure is something like this:
file name[random numbers].extension
There are brackets around the numbers as well which I'm not sure will help or not.
View 1 Replies
View Related
Aug 27, 2009
I am using hte rename command to clean up a bunch of files. I know you should be able to use regex with the rename command, but it seems to ignore them.Most of the time I am using something like:rename 'something' 'some' *Now lets say I have files named:
someFile(2009).ext
otherFile(2008).ext
File(2006).ext
[code]...
View 9 Replies
View Related
Oct 14, 2010
I have this script:
Quote:
for f in d*; do mv "$f" "T${f#d}"; done
it outputs all files which strats with letter d to T but it doesn't work when i run it from Cron. It only affect root file / .
How i can make work like this:
/home/user/files/dfile.txt
=>
/home/user/files/Tfile.txt
View 2 Replies
View Related
Nov 8, 2010
I guess the title says it all. I'm looking for a program that will rename a massive amount of files at once. JPGs specifically, or PNGs. More specifically,I'm creating a stopmotion movie. Using the program StopMotion. And for that, all you pictures, or frames, have to be named 001.jpg 002.jpg and so on. I've got about 300 or so images, and they're all named the default thing that my camera names them, you know, like DSCIM8520 or whatever. I'm looking for maybe a command line program or GUI is fine too, that will do this for me.
View 3 Replies
View Related
Dec 31, 2010
I have many files in a directory. They all have names with a .pdf extension. How can I remane all of them so that they are named as so... 1.pdf, 2.pdf, 3.pdf? I want to do it with one command or somehow that I do not have to manually rename each one.
View 1 Replies
View Related
Jan 12, 2011
I need to find and rename all .JPG files to .jpg in a folder with subfolders. How would I go about this?
View 1 Replies
View Related
Jul 11, 2011
The music files as named like the following: 01 Music Title. I would like to get them as: Band Name - Music Title. I looked into the rename command and I was thinking of doing something like this:
Code:
rename "s/(the first two integers)/Band Name -/g" *.mp3
The problem is that I don't know how to indicate the first two integers. Does anyone know how to do this?
View 2 Replies
View Related
Jan 21, 2011
I want to rename some files in one directory and found the command 'rename' most appropriate.
Changing the file extension is easy since there are lot of examples for this.
But now I want to rename my files like this:
'somePrefix_blablabla.ext' --> '0_blablabla.ext'
'somePrefix_blablablablabla.ext' --> '0_blablablablabla.ext'
I DON'T want an incrementation, just the leading prefix '0_'
correct perl expression syntax for this?
View 2 Replies
View Related
Feb 14, 2010
Getting together a script that will add numbers to all the files in a folder.
I've ripped most of my CDs to oggs for my new pmp, but I found that the pmp doesn't like files that are numbered just as 1 and 2, as it thinks that the 2 is more than 10.
So instead of going through all of my music folders and renaming every file by hand from 1 to 01 and from 2 to 02, I'd ask if there's a script that can be executed to add these numbers for me. It'd be even better if it only added the number to the files with only one digit.
Here's an example:
I want to rename:
And I'd like to do it to all single-digit files lower than 10 in the folder, if possible. If not, I can isolate them by hand.
View 4 Replies
View Related
Jun 19, 2010
I want to rename all files in a directory to "random" names(the point is that the name does not exist, it can be anything). In my case is it *.wav file i want to rename, i basically want to burn cd's to my pc with cdparanoia, then rename them and put them in a directory with other songs i have which also have been given random names. (i'm creating a big music directory where the songs have no names)And i will eventually make a script to make things easier, but for some reason i can't think out a way to rename the files randomly, and i guess "$RANDOM" is a good variable to use but.. how?EDIT: And while i'm at it, is there any way to use the "play" command in the terminal, by "sorting" music files in a directory randomly, and then play them, so it will not be played the same order again?
View 4 Replies
View Related
Sep 10, 2010
How I could rename multiple jpg files. Say I copied IMG0001.JPG until IMG0134.JPG from my camera, and want to rename IMG0001 until IMG0064.JPG to 'party01.JPG' untill 'party64.JPG', etc. In windows there was a stupid wizard to rename files when you copied them onto your HD from a camera. Is there any good way to do something similar in ubuntu?
View 1 Replies
View Related
Sep 11, 2010
In my photos folder, I have hundreds of folders, each with Picasa.ini files.
Unfortunately, a lot of these files are actually ".picasa.ini" files & Picasa 3.0 does not recognize them.
All I want to do is rename all those ".picasa.ini" files to "Picasa.ini".
If there was a GUI way to do this, all in one go, then that would be my prefered method.
I couldn't find one, so reluctantly tried Terminal. After a lot of reading & trying, still no success.
"locate .picasa.ini" finds all the files easily.
I tried many variants around: "rename -v -n 's/.picasa.ini$/Picasa.ini/' .picasa.ini" to run a simulation without screwing anything up yet, but at best they only seem to rename one occurence, not all the files.
View 6 Replies
View Related
Feb 22, 2011
I am quite new to script programming and I am facing an uphill task to rename files in one folder. I have gone through similar posts but most of them deal with renaming files by changing the file extensions.Problem : I have a folder which contains files like bild01.jpg,bild02.jpg. There are more files in the folders which should remain untouched. I want to rename these 'bild' files as follows:
bild01.jpg -----> 1c.jpg
bild02.jpg -----> 2c.jpg
bild30.jpg------>30c.jpg
I would like to create a script as:
#!/bin/bash
npics=`ls -1 bild*| wc -l`
[Code]...
View 1 Replies
View Related
Oct 20, 2010
I need help with renaming files and folders in one go.
I have a folder called /opt/utility/pictures/
Inside that folder have sub-folders and files such as code...
View 6 Replies
View Related