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
15
votes
2 answers

After renaming project i get not found.

I first duplicated my project before I renamed it. After the rename i'm getting Lexical or Preprocessor Issue not found. The error directs me to the myapptests.m file which calls to #import Also the next…
user3294722
  • 235
  • 1
  • 2
  • 12
15
votes
4 answers

rename folder into sub-folder with PHP

I'm trying to move a folder by renaming it. Both the test1 and test2 folders already exist. rename( "test1", "test2/xxx1/xxx2" ); The error I get is: rename(...): No such file or directory I assume this is because the directory "xxx1" does not…
Workoholic
  • 179
  • 1
  • 1
  • 5
15
votes
4 answers

Completely renaming a project in Eclipse

I have done Refactor -> Rename in Eclipse and the project has been renamed successfully in Eclipse. But when I copy/paste it in a folder, it still keeps the old name. How can I completely rename it?
NiVeR
  • 9,644
  • 4
  • 30
  • 35
15
votes
5 answers

bash removing part of a file name

I have the following files in the following format: $ ls…
HattrickNZ
  • 4,373
  • 15
  • 54
  • 98
15
votes
2 answers

Emacs: how to rename a directory in dired-mode?

In Emacs, how does one rename a directory in dired-mode?
dephiros
  • 353
  • 2
  • 7
15
votes
3 answers

remove double extensions in bash

I am familiar with rename but I was curious does rename still apply for removing duplicate extensions?? Say I have a few files named: picture2.jpg.jpg picture9.jpg.jpg picture3.jpg.jpg picture6.jpg.jpg How would you remove the the duplicate…
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
15
votes
2 answers

changing variable name matlab

I want to change a variable name before I export it to the global enviroment, the data is very large, meaning I can not copy it to another variable and delete the first one. the data is loaded to certain variables and that I cannot change as well,…
jarhead
  • 1,821
  • 4
  • 26
  • 46
14
votes
2 answers

Is it okay to "abuse" Mercurial's rename functionality to track movement of code blocks?

Sometimes I find that I've got a file that has over time grown to contain more classes/functions/whatevers than I like. It's time to refactor! I usually find in this case that my one file becomes several: itself plus several other files, each…
Chris Phillips
  • 11,607
  • 3
  • 34
  • 45
14
votes
4 answers

Python renaming Pandas DataFrame Columns

import pandas as pd import numpy as np datain = np.loadtxt(datafile) df = pd.DataFrame(data = datain, columns = ["t","p","x","y","z"]) avg = df.groupby(["t"], sort=False)["p"].mean().rename(columns={1:"mean"}) This doesn't work, it tells me…
Will
  • 677
  • 3
  • 11
  • 21
14
votes
4 answers

Gradle task to rename file

I want to do a simple file rename in a gradle task. I have a jar called project-1.5.jar under the folder src and I want the jar to be renamed to just project.jar So, project/project-1.5.jar to project/project.jar using gradle Any ideas are much…
George Cimpoies
  • 884
  • 2
  • 14
  • 26
14
votes
2 answers

Git on windows: Can't switch branch after renaming a file (only changed case)

I'm working with git on windows, and I have a file in my repo, lets say "foo.txt". Today I wanted to rename this file to "Foo.txt" (uppercase). As suggested in this SO question, I used git mv -f foo.txt Foo.txt, which produced the desired result. I…
avivr
  • 1,393
  • 15
  • 28
14
votes
4 answers

Rename multiple files without parentheses/remove parentheses windows

I want to rename a large number of files in increasing order of numbers, starting from anywhere. But when I rename multiple files, it leaves me with parentheses. eg i rename files to abc_.jpeg it results in abc_(1).jpeg, abc_(2).jpeg and so on. I…
neeraj
  • 1,191
  • 4
  • 19
  • 47
14
votes
3 answers

copy tree with gradle and change structure?

Can gradle alter the structure of the tree while copying? original mod/a/src mod/b/src desired dest/mod-a/source dest/mod-b/source dest/mod-c/source I'm not sure where I should create a closure and override the copy tree logic I'd like to do the…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
13
votes
3 answers

One liner to rename bunch of files

I was looking for a linux command line one-liner to rename a bunch of files in one shot. pattern1.a pattern1.b pattern1.c ... Once the command is executed I should get pattern2.a pattern2.b pattern2.c ...
Jean
  • 21,665
  • 24
  • 69
  • 119
13
votes
1 answer

Eclipse rename/refactoring override

I am new to eclipse plug-in development. I want to customize the renaming of a project. I need to validate the new name. So how can I override eclipse's rename/refactoring method? I saw something related to RenameParticipant, but didn't understand…
Ann
  • 231
  • 1
  • 4
  • 9