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
1
vote
1 answer

Re-Post - Ruby on Rails Script to Rename Files

I have reposted this because i have added to it I have a script that renames files from a .csv file, this file works fine but am looking to edit it a little bit more so that it help me even more. The scenario is I have 8,000 images that have a CID…
Jack Eccleshall
  • 615
  • 2
  • 10
  • 19
1
vote
0 answers

Assigning dataframe column names within a for-loop in R

I am new to for loops and I am struggling to accomplish something that is probably quite basic. This code is running several similarity statistics in the loop. However, when I try to name each dataframe column using the i from the for loop(i.e.…
lwe
  • 323
  • 1
  • 8
1
vote
1 answer

How to store the output of my customized function in R?

I want to build my function to change the column name. x1 = c(1:5) x2 = c(6:10) x = data.frame( X1 = x1, X2 = x2 ) myFunction = function(x) { x <- rename(x, "newX1" = "X1") x <- rename(x, "newX2" = "X2") newX <- x …
Inho Lee
  • 127
  • 1
  • 12
1
vote
1 answer

Is there a way to specify flextable header labels by just listing the new header names in order?

I'm using flextable with a dataset that has many columns, and I want to use set_header_labels() to change them all at once, in order, without having to specify which name goes with each specific value. However, my code keeps running but not working.…
J.Sabree
  • 2,280
  • 19
  • 48
1
vote
1 answer

Rename specific column elements based on elements in another column

Apologies if this is a simple problem, I was really struggling to find a solution. There's this question here which is similar, but not quite the same and none of the solutions seemed to work for me: Replacing row elements in a column based on row…
1
vote
1 answer

Changing batch text format

i have around 900 lines of text in this format: AddTextEntry("TextHere", "TextHere") .. i want to rename these to this format: {model = "TextHere", vehicleName = "TextHere"}, while keeping all of the original text in place which is in this example…
wzrw
  • 13
  • 4
1
vote
1 answer

Rename some files present in the folder with other filename that is present in other folder in VBscript

I have a folder 1 where there are two CSV files present with name "Head.csv" & "Col.csv". I want to rename all those CSV files that are present in folder 1. The suffix that I wanted to add to each CSV file is another filename that exists in the…
1
vote
1 answer

How to change .pbix filename and replace by different .pbix file with different name by using C#?

To prevent lose of setting like scheduled refresh time, are there any ways to change the .pbix filename (i.e. report name in PowerBI console)? Thus, if want to change the content and filename, how to do that? Below is my current code that can only…
DaiKeung
  • 1,077
  • 1
  • 19
  • 38
1
vote
3 answers

Windows batch file to find a word and rename the file

I've been looking through many different posts, but can't find a batch script that works for me. We have an app that only outputs a file called SALES.CSV. This is what one of the lines looks…
1
vote
1 answer

Trying to write a script to change the end of file names with a .bat

I have a bunch of files that I need to rename. They are variable length. Like this: A1B2C3D4.en.fr.pdf A1B2C3D4S8.it.fr.pdf A1B2C3.de.fr.pdf A1B2C3D4E5.zn.fr.pdf I want to change them so that I can run a .bat file to make 2 changes: prefix them…
lycalys
  • 11
  • 2
1
vote
1 answer

Powershell - Unzip all zipped files in a directory as well as rename them based on the parent file names

I have a folder and set of files like so: Root > Parent 1 > file 1 > export.zip > export.txt file 2 > export.zip > export.txt file 3 > export.zip > export.txt Parent 2 > file 1 > export.zip > export.txt file 2 > export.zip > export.txt file 3 >…
Pete
  • 11
  • 1
  • 2
1
vote
1 answer

How to loop to standardize and rename a set of variables

I have a data set with 1000 variables. The naming fashion of the variable is as shown in the figure below. Now I want to use a loop function to standardize each of these 1000 variables and keep their original names. That is, I want the new…
zjppdozen
  • 63
  • 5
1
vote
2 answers

How to rename an uploaded file before it is saved?

I am using this snippet below to get the filename and extension, which works, but how can i rename the file so that filename will equal bake23 + the extension of the file. $variable = 'baKe23'; $filename = $_FILES['filename']['name']; $ext…
KPO
  • 890
  • 2
  • 20
  • 40
1
vote
1 answer

How to duplicate sheet using google apps script and rename it based on last column value in Row 1?

Hi everyone, I want to duplicate the sheet and rename the duplicated sheet based on the name in row 1 (shown in the screenshot above). So for example, when I run the script, the script able to find the last value in row 1 ("Phase 1" in this case)…
weizer
  • 1,009
  • 3
  • 16
  • 39
1
vote
1 answer

Renaming levels based on factors of other column R

I have a large dataframe where names (col1) should be nested within location name (col2). In the example below "d" from col1 should be within "z" of col2 but is listed as "y" in the eighth element. I cannot just rename "y" in col2 as it is correct…
AdSad
  • 77
  • 4
1 2 3
99
100