file-rename

How can I get the original capture timestamp from my home movie files:: AVI and MPG4?

I have over a TB of home movies with horrible file names. Finding what you want is impossible. I would like to rename all files to the time they were originally recorded (not the file time they were placed on my computer). Some applications (like Ulead Video Studio) can access this information, which I believe is embedded in the CODEC. ...

Fast/easy renaming of filenames in TFS (CodePlex)

I host a project on CodePlex, but a bunch (200+) files need to have their extension changed. What is the easiest, least painful way to do this? I cant see myself doing them one by one in the IDE. Update: I know I can just remove and change them via the commandline/utility, and readd them, but that would lose history. Perhaps there ...

C++ stdio::rename(); synchronous?

I was just wandering if stdio::rename() function call is fully synchronous. So is the file immediately after return from the function call available under new name or it might take some time (some miliseconds) until this happens? I am investigating an irritating timing bug and suspect that the latter case happens. My software runs on Wi...

Batch Renaming with Bash

How can Bash rename a series of packages to remove their version numbers? I've been toying around with both expr and %%, to no avail. Examples: Xft2-2.1.13.pkg becomes Xft2.pkg jasper-1.900.1.pkg becomes jasper.pkg xorg-libXrandr-1.2.3.pkg becomes xorg-libXrandr.pkg ...

Renaming files the same way again and again

I had a program work on some images of mine and it returned them to my directory. funny thing, they're now all png images instead of gif. At first i thought it was simple renaming, but I tested with php using createimagefrompng(), which will throw an error if the image is not a valid png file. No errors were returned. Wheter or not thi...

Batch rename issue when dealing with special chracters in the filename

I have several hundred *.mp3 files in c:\files. There are all imaginable filenames in there like milad.mp3 (good behaving) hey you.mp3 (space in filename) systemofadown.mp3 (long filename) howdy(1).mp3 (parentheses in filename) and any combination of the last three conditions. I want to rename the files to 001-test.mp3, 002-mp3, ... ...

batch rename to change only single character

How to rename all the files in one directory to new name using the command mv. Directory have 1000s of files and requirement is to change the last character of each file name to some specific char. Example: files are abc.txt asdf.txt zxc.txt ... ab_.txt asd.txt it should change to ab_.txt asd_.txt zx_.txt ... ab_.txt as_.txt ...

Copy a directory tree to a single directory at a command line

Anyone know of a command line utility (or one that can run as a command line) that will collect all the .jpg files in a directory tree to a single folder, only copying files that change? I started with Renamer, which is great for renaming files in their current directories, but fell short when I tried to mangle the path. This is probab...

Reliable File.renameTo() alternative on Windows?

Java's File.renameTo() is problematic, especially on Windows, it seems. As the API documentation says, Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a f...

Rename multiple files in Unix

There are multiple files in a directory that begin with prefix fgh, for example: fghfilea fghfileb fghfilec I want to rename all of them to begin with prefix jkl. Is there a single command to do that instead of renaming each file individually? ...

Batch code to re-name set of template files by changing part of the name of one file (all files to copy changes to the same text).

I have created a filing system containing folders as templates for re-creating a set of information to be used when we accept bookings and need a batch command to rename all files within a directory but in a very specific way. So to be more precise the directory contains: one file is an invoice template (PDF form) and another is a job d...

What's the best way to automate file renaming?

Here's the situation: I have an excel file which contains the following information: Document location: (C:/folder/sub/file.doc) and Document New Name: (RENAMED-FILE.doc) What would be the be the best way to automate this as I have about a thousand files to rename? *Note: Document location can be in different locations (files will not...

What's the best way to automate text replacing?

Here's the situation: I have a lot of HTML files, and these HTML files link to a lot of documents. The documents have ALL been renamed. I have an excel sheet which has the old name of the file and the new name of the file. What would be the quickest way to change the links inside the HTML files to accommodate the new names? The method...

asp.net file-rename

How to solve the following problem? I have renamed a file from 'OldMailsCollection.aspx' to 'StudentOldMail.aspx'. The code-behind file is renamed automatically. I have also updated the reference. But when I compile the solution a file with a random name opens up. This file is from the directory C:\WINDOWS\Microsoft.NET\Framework\v2....

How to find out why renameTo() failed?

Hi, I am using WinXP. I use java to generate a list of files. The file will be created as abc.txt.temp at first, and after completing the generation, it will be renamed to abc.txt. However, when i generating the files, some of the files failed to be renamed. It happen randomly. Is there anyway to find out the reason why it failed? i...

Potential errors with my makeValidFilename function?

It is inspired by "How to make a valid Windows filename from an arbitrary string?", I've written a function that will take arbitrary string and make it a valid filename. My function should technically be an answer to this question, but I want to make sure I've not done anything stupid, or overlooked anything, before posting it as an ans...

How to rename files in a for loop in Perl

Hi, I am running a Perl script and try to accomplish renaming files as below.. I have a list of *.ru.jp files in a folder with other non related files. I would like to rename with a number which I have got as a counter variable. In Bash,I would do as ... for i in $(ls *.ru.jp); do x=${i%%.*}; mv $i "$x"t"$counter".ru.jp ;done E.g...

Why File System Watcher is almost blind?

I am using FileSystemWatcher in order renaming files within a Watched directory. The problem occurs if the number of files copied simultaneously to the watched directory exceeds the number of 50... The rename event is fired successfully for the first 50 files, but after that nothing happens Any suggestions please? ...

Force rename a file in Java

Can I use any utility to do a force rename of a file from Java.io? I understand that Java 7 has these features, but I can’t use it... If I do a File tempFile = File.createTempFile(); tempFile.renameTo(newfile) and if newfile exists then its fails. How do I do a force rename? ...

Changing the title on an editor when the input changes due to file rename

Hi, how would I go about updating the title bar of an Eclipse editor when the file input changes to reflect the new filename? For instance, when the file is renamed but you still have an editor open on the file. Everything I've done so far has failed, even when following the official guidelines on doing this (using special interfaces, cl...