rename

rename file and replace old file name with file from previous revision in Subversion

I have a Subversion branch checked out using TortoiseSVN in Windows. I have a file, call it myfile.txt, that I want to rename, say to mynewfile.txt. I want to keep myfile.txt around, however, and just revert it back to a previous revision, say r15. So, I want myfile.txt to have content from r15 and mynewfile.txt to have myfile.txt's c...

Move a file and rename it.

Figured PHP's rename would be my best bet. I didn't see many examples on how to use relative URLs in it though, so I kind of compromised. Either way, this give me permission denied: I want to do this: $file = "../data.csv"; rename("$file", "../history/newname.csv"); Where ../ of course would go back 1 directory from where the script ...

PHP rename does not work

Hi, I download a file with cURL using option CURLOPT_FILE and then try to rename the downloaded file, for example, from "1.txt" to "2.txt". It fails to rename the file. PHP throws an error: "Warning: rename(E:\.../test/1.txt,E:\.../test/2.txt) [function.rename]: No such file or directory in E:\.../test\lib\CURL\Download.php on li...

Easy way to rename rails controllers

Is there an easy way to rename a controller? The only way I know of is to either do it by hand or generate a new controller move the code over and destroy the old one. Seems like there has to be a programmatic way to do this. ...

How to rename your app in itunesconnect?

Is there any way to rename you app in itunes connect? ...

Recursively remove filename suffix from files in shell

When we develop locally, we append ".dev" or ".prod" to files that should be made available only to the development/production server respectively. What I would like to do is; after deploying the site to the server, recursively find all files with the ".dev" suffix (for example) and remove it (renaming the file). How would I go about do...

Java - renameTo method not working

I'm trying to use the renameTo method in Java but it just returns false and doesn't move the file. Am I missing a step? Is there a way to find out why it's not moving the file? The delete method doesn't do anything either. Here's my code showing how I'm using it: private void archiveOutputFile(File outputFile) { SimpleDateForm...

Best approach to detecting a move or rename to a file in Linux?

Some solution could probably be applicable to Windows, however I am not familiar with the Windows OS, so this will be Linux focused. As far as I understand, Unix file system all have the concept of inodes, which is where the file system metadata and the "file" is stored. Thus I am wondering if it is possible to use the inode number wit...

Batch renaming using shell script

I have a folder with files named as input (1).txt input (2).txt input (3).txt ... input (207).txt How do I rename them to input_1.in input_2.in input_3.in ... input_207.in I am trying this for f in *.txt ; do mv $f `echo $f | sed -e 's/input\ (\(\d*\))\.txt/input_\1.in/'` ; done But it gives me mv: target `(100).txt' is not a d...

SQLAlchemy duplicate table, rename table?

All, This is a snippet from internet repersent the database table will be used: >>> from sqlalchemy import Table,Column,Integer,String,MetaData,ForeignKey >>> metadata=MetaData() >>> users_table=Table('users',metadata, Column('id',Integer,primary_key=True), Column('name',String), Column('fullname',String),...

How to add prefix or postfix to rename batch file?

Hi I've created a rename batch file and it takes 3 arguments and renames files inside a folder The batch file script is @echo off&set /a cnt=1 set arg1=%1 set arg2=%2 set arg3=%3 for %%a in (%arg1%\%arg2%) do call :PROCESS "%%a" goto :EOF :PROCESS rename %1 %arg3%%cnt%.* set /a cnt+=1 Eg syntax is: rename.bat e:\ranks\Ranks *.gif ...

Renaming object keys(variables) in javascript

Hello, I am having an object with variables named [0...10] and few variables with normal names. I delete one of them with delete obj[3]. Then there is a gap in this sequence. I want to arrange them now from [0...10]. My first though is to loop through and rename keys(variables). How I can do it? P.S. - Object cannot change its structu...

PHP: moving directories with contents?

I'm having an array $bundle that stores filenames and directory names. I'm running through the array with a foreach loop and I want to move them inside of another directory. I'm using the rename method therefore and it works pretty fine with JUST FILES. However directories with other files in there don't respond to the rename() method....

Renaming a database model in Visio 2003

I have to translate a datamodel i Visio from one language to another. This can be done by using Edit -> Replace, but it only modifies the visual representation. The values in the database properties are not changed. That becomes a problem when Visio updates the layout and writes the values from the properties to the ER diagram. How can ...

msdos rename all files to lowercase, replace spaces

In a DOS prompt, how can I rename all the files to lower case and remove all spaces? ...

PHP rename file on same host

$url = 'http://site.com/images/name.jpg'; Its a full path for the file, which is already exists on ftp. How can I change file's name? ...

Find files with no extension in linux and mass rename them

I have a bunch of files on my server that look like below. I need to write a script that will rename all the files from JPG to .jpg as you can see some of them already have the .jpg extension and some don't. Can you help me? I could do it in either bash or through php, whatever is easier, I just don't know how. Thanks Jason jects/Ed...

Strange bug when renaming a file with NSFileManager

I used to use the following to rename aplist file with various user inputted values (BOOL,Strings mostly): [manager moveItemAtPath:oldPath toPath:newPath error:&error]; And for some reason in iOS4+ this glitches out, so I Attempt the following: [1] [manager copyItemAtPath:oldPath toPath:newPath error:&error]; [2] [manager rem...

Change file name suffix(es) (using sed ?)

I'd like to change the file name suffix from files (using a bash script), but sometimes there are files with one period and some with two. Now I use this: new_file=`echo ${file} | sed 's/\(.*\.log.*\)'${suf}'/\1.'${num}'/'` Where 'new_file' is the new file name, 'file' the original file name, '${suf}' the file's suffix and ${num} a n...

Oracle - drop table constraints without dropping tables.

I'm doing some bulk migration of a large Oracle database. The first step of this involves renaming a whole load of tables as a preparation for dropping them later (but I need to keep the data in them around for now). Any foreign key constraints on them need to be dropped - they shouldn't be connected to the rest of the database at all. I...