rename

How to durably rename a file in POSIX?

What's the correct way to durably rename a file in a POSIX file system? Specifically wondering about fsyncs on the directories. Note: there are other questions on StackOverflow about durable renames, but AFAICT they don't address fsync-ing the directories (which is what matters to me - I'm not even modifying file data). I currently ha...

Rename multiple sequentially numbered files and change numbering format using BASH?

Hey all,     I have a bunch of sequentially named files in this format: imageXXX.jpg. So it would be like image001.jpg and onward. I just want to keep the number part of this, and get rid of the prepended 0's. So instead, that file would be named 1.jpg. How could I achieve this using BASH? Thanks!   -Trey ...

How do I create batch file to rename large number of files in a folder?

I'd like to rename a large number of files within a folder on a WinXP system, preferably using a batch file. The files are currently named like this: Vacation2010 001.jpg Vacation2010 002.jpg Vacation2010 003.jpg And I'd like to change them to: December 001.jpg December 002.jpg December 003.jpg How can I perform this...

Rename files to lowercase in Powershell

I am trying to rename a bunch of files recursively using Powershell 2.0. The directory structure looks like this: Leaflets + HTML - File1 - File2 ... + HTMLICONS + IMAGES - Image1 - Image2 - File1 - File2 ... + RTF - File1 - File2 ... + SGML - File1 - File2 ... I am using the following command: get-c...

How do I rename a project in Xcode?

i have a finished application written with objective c and I would like to rename the file. how do i do that? ...

git mv records move?

When invoking git mv file1 file2 does it record the move internally (for history tracking in the log) or is it completely the same as invoking mv file1 file2, git rm file1 and git add file2? ...

What is the best practice for safely change a method name in a team project?

I often get scary whenever I need to rename a method since it's very likely to break other working codes. What is the best guidance to follow when doing this? ...

change names of all files in a directory to random strings

Purpose: change names of all files in a directory to random strings of the same length list this files in another file (with a possibility to make from it sql query ) I think bash would be great for it, but I have no idea how to do this, can you help me? ...

TableView ReloadData not working after action

Can someone help me? I made an action to rename items in my uitableview. The table view is populated with videos located in a directory. The problem is when I try to rename a file, th reloaddata do not work. I need to tap on my first tab and come back to the second tab to see the change. This is what I have: - (void)viewDidAp...

Open dired and select the file associated with the previous buffer?

Let's say I am editing blah.txt with Emacs and I decide to open dired to rename the file blah.txt. When I press C-x d RET (or C-x C-f RET), a dired buffer will show up to display the content of the directory containing blah.txt, but the cursor will not be on blah.txt. So I need to search my file first (C-s blah.txt) to place my cursor on...

A sane way to rename a directory in subversion working copy

While somehow versed in VCS (regular svn, git and git-svn user) I can't seem to wrap my head around this peculiar SVN behavior. Whenever I need to rename a directory in my SVN working copy from an otherwise 'clean' state - i.e svn status returns nothing and all other modifications have been commited - like so (which is what the svn doc ...

how to change my domain Name to new one in Ubuntu Apache PHP?

Hello guys, I need help. Currently I am using Ubuntu Apache server with PHP. My server name is some rt-arr-php. I want to change it to rtapp.arr.edu Please help me. Thanks, Raj ...

Microsoft SQL Compact Edition rename column

Hy, I'm new with SQL Compact Edition and I am having problems renaming a column. I know that you can rename a table using sp_rename and this doesn't work with columns. I've searched for an alternative, but didn't find one. Can I delete a column and then add a new one after a specific column? If I delete the column and add it after t...

rename files with python - regex

hello, I am wanting to rename 1k files using python. they are all in the format somejunkDATE.doc basically, I would like to delete all the junk, and only leave the date. I am unsure how to match this for all files in a directory. thanks ...

Batch renaming files in unix and rollback

I rename few files (1234.xml, 9876.xml, 2345.xml etc) with .xml extension with the following code : for i in *.xml do mv $i $i.ab done it becomes 1234.xml.ab, 9876.xml.ab, 2345.xml.ab...etc Now, I want to rename it to 1234.xml.SD, 9876.xml.SD, 2345.xml.SD...etc. These are 100 files. How can this be achieved with the hel...

Mercurial: how to merge changes to a file that's renamed in the other branch?

I have a Mercurial repository with four branches in it. One is the "common" branch, the other three are "specific" branches which consist of some cosmetic changes applied to the common branch. One of those cosmetic changes consisted of renaming some files. So the common branch has "file.txt", and the first specific branch has "file-01.t...

VBScript: Trim characters from left of folder names

Hello, I would like to trim an x amount of characters from the left of multiple folders. Imagine having these folder names: 01.a-foldername 02.b-foldername 03.c-foldername After being processed by the VBscript they become: a-foldername b-foldername c-foldername ...