Questions tagged [rename]

For anything regarding renaming. Could be applicable to a wide range of subjects. Should be replaced by a more domain-specific tag if applicable.

Questions regarding renaming one or many files, directories, projects, variables, users, data cells, and version control conflicts arising from renaming should be tagged with rename.

To rename a file means to give an existing file a new name without changing any of its content. In UNIX systems, this is done with the mv command.

Renaming a variable will usually require a find-and-replace edit in existing code.

5438 questions
26
votes
1 answer

How do I rename a MySQL schema?

Is there a MySQL statement for renaming a schema? I know about RENAME {DATABASE | SCHEMA} db_name TO new_db_name;, but that statement "was found to be dangerous and was removed in MySQL 5.1.23" (as they mention in here). I was also trying to do it…
snakile
  • 52,936
  • 62
  • 169
  • 241
26
votes
6 answers

Rename nested field in spark dataframe

Having a dataframe df in Spark: |-- array_field: array (nullable = true) | |-- element: struct (containsNull = true) | | |-- a: string (nullable = true) | | |-- b: long (nullable = true) | | |-- c: long (nullable =…
MaxPY
  • 1,256
  • 4
  • 15
  • 30
26
votes
4 answers

Rename list items

I have the following list listaValores listaValores <- c() for(valores in 1:numRepeticion){ listaValores <- c(listaValores, readWorksheetFromFile(file = file.read, sheet = sheet.read, …
26
votes
6 answers

How do I rename a primary key column in MySQL?

How do I rename a primary key column in MySQL?
Vinicius Rocha
  • 4,023
  • 4
  • 29
  • 38
25
votes
3 answers

renaming the name of the APP alone in Android Eclipse IDE

I created a wonderful app, but I want to rename the "application name" alone... (i.e the name seen by the user on the app icon ) .. ( this isn't package renaming) How do I do it, without creating a new one ...
Zac
  • 695
  • 1
  • 11
  • 34
25
votes
4 answers

Rename columns in Pandas based on a dictionary

I have a pandas DataFrame and I would like to rename the columns based on another DataFrame that I plan to use as dictionary. For example, the first DataFrame is: AAA BBB CCC DDD index 1 1 2 3 4 2 5 …
km1234
  • 2,127
  • 4
  • 18
  • 21
25
votes
3 answers

db.collection.update( ) all documents

I try rename one field in all documents of a collection, with db.coll.update({},{ $rename: {'originField':'newField'} }); but only one document is changed, why ?
JuanPablo
  • 23,792
  • 39
  • 118
  • 164
24
votes
1 answer

How to rename primary key constraint in SQL Server

I have a PK constraint on table Notes named PK_dbo.Notes and want to rename it to PK_Notes using SQL Server DDL, i.e. not by using SSMS rename menu option. Mentioned in another question's answers queries don't work for me. That thread's answers are…
pkuderov
  • 3,501
  • 2
  • 28
  • 46
24
votes
9 answers

Batch rename files

I want to batch re-name a number of files in a directory so that the preceding number and hypen are stripped from the file name. Old file name: 2904495-XXX_01_xxxx_20130730235001_00000000.NEW New file name: …
van
  • 9,159
  • 19
  • 60
  • 93
24
votes
4 answers

Mass rename of file extensions recursively (windows batch)

I have numerous files in a very complex directory structure, and for reasons not worth discussing I need to rename all files with the extension of ".inp" to have ".TXT" extensions. There are numerous other files with other extensions that I do not…
Raiden616
  • 1,545
  • 3
  • 18
  • 42
24
votes
1 answer

Mercurial: TortoiseHg's "guess rename" from the commandline?

Is there any hg functionality to mimic the "guess renames" command of TortoiseHG? I really dig this one, however I am currently using MacOS and have Murky or the commandline interface available.
Johannes Rudolph
  • 35,298
  • 14
  • 114
  • 172
23
votes
1 answer

Renaming Files with Excel VBA

Here's what I need to do. I have these two columns in an excel sheet. With file names. First column has the current filename and the second column has the names I want the files to be renamed to. I need to use this as there's no pattern in renaming.…
redGREENblue
  • 3,076
  • 8
  • 39
  • 57
22
votes
2 answers

Make git ignore rename

I have a file foo.txt which I want to delete, and another, bar.txt, that I wish to add. If these two files have more than 50% content that is the same, Git will consider that foo.txt is being renamed to bar.txt. How can I make Git really see this…
torngat
  • 635
  • 1
  • 5
  • 16
22
votes
2 answers

Rename all files in a directory with a Windows batch script

How would I write a batch or cmd file that will rename all files in a directory? I am using Windows. Change…
Blainer
  • 2,552
  • 10
  • 32
  • 39
22
votes
6 answers

Renaming a set of files to 001, 002,

I originally had a set of images of the form image_001.jpg, image_002.jpg, ... I went through them and removed several. Now I'd like to rename the leftover files back to image_001.jpg, image_002.jpg, ... Is there a Linux command that will do this…
DisgruntledGoat
  • 70,219
  • 68
  • 205
  • 290