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.
5,400
questions
0
votes
1
answer
73
views
Bash - Rename media files. Remove special characters from filenames. Goal is Filename=Title.filetype [closed]
I am playing around to test my acquired bits of ideas gathered from asking here and browsing the internet to rename some media files on a directory. I have
printf "%s\n" *
01 - Concrete ...
-1
votes
0
answers
21
views
Renaming 19,000 files [closed]
I'm not sure if I'm even asking the right questions.
Problem: 19,000+ lightroom CC files got renamed "untitled-3untitled shoot" because I moved them improperly, likely losing sidecar files.
...
0
votes
2
answers
26
views
Shell Patterns: re-use matched string (part of the filename)
I have a directory, filled with .mp4 files, and another directory subdir in it. I know I can move all these files into subdir by running following command:
mv ./*.mp4 ./subdir/
But what if I wish to ...
0
votes
0
answers
8
views
Rename file with html tag values before/after uploading
I need to rename a file with selected value of dropdown tag separated with (-) sign.
I try code bellow but become stack.
any help?
[change file name from (vm-path) to: (Bursa-Avcilar-05-03-2022)]
0
votes
0
answers
16
views
Can't rename .wav file after playsound. WinError 32, file in use
I am building a simple .wav audio file renamer that iterates over each file and plays them via playsound module before asking if the file should be renamed. It plays each file just fine, but I get &...
0
votes
0
answers
16
views
I just want to rename a bunch of files with the same extension to the name of the folder that they are in, in python. how can I do it?
Folder
|
-----subfolder
|
------ files
The rough map of what I'm trying to describe. The are files with a certain extension and same name among other files. I just want them to be copied to another ...
2
votes
1
answer
32
views
Rename certain subfolders in a directory using python
I have a folder structure that looks something like this:
/Forecasting/as_of_date=20220201/type=full/export_country=Spain/import_country=France/000.parquet'
and there are approx 2500 such structures.
...
0
votes
0
answers
12
views
Airflow rename table to <name>+timestamp
I inherited a number of DAGs in airflow and while troubleshooting I can see that tables get
renamed from x to x+timestamp
recreated and populated
Is this a default airflow behaviour? I cannot see it ...
1
vote
1
answer
23
views
How to rename files based on CSV file with FOR /F loop?
I'm trying to automate renaming of files based on a CSV such as the one shown below:
Name,FullName
John,JohnDoe
Jane,JaneDoe
Joe,JoeDoe
Let's say I have 3 text files within the same folder of my .bat ...
0
votes
2
answers
35
views
pandas - rename_axis doesn't work as expected afterwards - why?
i was reading through the pandas documentation (10 minutes to pandas) and came across this example:
dates = pd.date_range('1/1/2000', periods=8)
df = pd.DataFrame(np.random.randn(8, 4),
...
-4
votes
0
answers
23
views
Bulk rename files SED (versioning remove) [closed]
Is there any way to rename in bulk (including subdirectories) files like these ones. I need to remove versioning from each css file including subdirectories:
file.css?ver=1.6.9 -> file.css
0
votes
0
answers
34
views
Question about replacing text string in PowerShell [closed]
I would like to replace the first part of the text string in the files (see screenshot) using PowerShell. However, all of the portions are unique?
Image related to question
Mode ...
1
vote
3
answers
62
views
batch rename matching files using 1st field to replace and 2nd as search criteria
I have a very large selection of files eg.
foo_de.vtt, foo_en.vtt, foo_es.vtt, foo_fr.vtt, foo_pt.vtt, baa_de.vtt, baa_en.vtt, baa_es.vtt, baa_fr.vtt, baa_pt.vtt... etc.
I have created a tab separated ...
-2
votes
0
answers
44
views
Rename multiple PDF file names, based on its content
I am trying to rename PDF files that are in the folder C: \ ...
I need to rename all the files based on its content in Page 1
I have a code that I researched but it extracts all the data from the pdf ...
-1
votes
0
answers
41
views
Rename folder java
I've been struggling with renaming a directory with directories/files in Java. I tried using this approach:
File oldDir = new File("path/to/oldDir");
File newDir = new File("path/to/...
2
votes
1
answer
31
views
Haystack specify column for Prediction
I am using an OpenSearchDocumentStore to store my data an feed it to my Haystack pipeline, the data includes uuids and other information, that are not relevant for the prediction but need to stack in ...
-1
votes
1
answer
25
views
Replacing inconvenient package name. Got error: replacement module without version must be directory path (rooted or starting with ./ or ../)
Problem
In go.mod file I wrote:
module github.com/Siiir/vector
go 1.17
require github.com/huandu/go-clone v1.3.2 // indirect
replace clone => github.com/huandu/go-clone[v1.3.2]
It says that I ...
2
votes
1
answer
19
views
No code I run to rename this column will work
I am trying to rename the last column in this df:
Entity Year Sales of cigarettes per adult per day (International Smoking Statistics(2017))
0 Armenia 1988 12.0
1 Armenia 1989 11.6
2 ...
-1
votes
3
answers
64
views
rename files that match strings in a txt file
I am trying to rename multiple files according to the match to a .txt file
my files are
GCF_000698265.1_ASM69826v1_genomic.gff.gz
GCF_000785125.1_ASM78512v1_genomic.gff.gz
GCF_000934565....
0
votes
1
answer
15
views
automatically rename columns in pandas based on two indices in loops
I want to automatically rename the column names of a dataframe in pandas using two loops. The indices name should include "C" + "a number between 1 and m" + "a number between ...
0
votes
1
answer
19
views
Imagemagick Keep File Names & Add Prefixes
I have a script that resizes all images from a source directory into a destination directory, but I need to keep the original filenames and add "100-", "200-" and "400-" ...
0
votes
2
answers
17
views
How do I rename a file in Python with a random file name?
I am trying to code a program/horror game which requires me to download a file, place it on the Desktop, and rename it to a random set of lowercase letters.
This is the code I have to generate and ...
0
votes
1
answer
19
views
rename multiple directories using rename
I have a directory with multiple subdirectories (700 or so) named as such:
ls
quantsSample1
quantsSample2
quantsSample3
I want to bulk rename the subdirectories to remove "quants" from the ...
0
votes
1
answer
46
views
Automated Script to Rename and Resize jpg Images
I have a bit of a difficult problem to solve.
I have a folder that contains a large amount of image files, and new image files are added daily (all JPG) that are named in a way that ensures there are ...
0
votes
1
answer
53
views
AWS CDK: How to rename existing stacks without losing the ability to update?
I've created and deployed a production stack:
const app = new cdk.App();
const stack = new cdk.Stack(app, 'myorg-production-api');
Now It's important to change the naming schema, and I need this ...
-1
votes
0
answers
21
views
Changing image name while uploading image in PHP 8.0
I am trying to have users upload an image and change the file name of the image they upload to a unique ID they have input into the previous form.
This is the form:
<?php include 'upload.php'; ?>...
0
votes
2
answers
71
views
Rename multiple files in Bash with random strings [closed]
Assuming an arbitrary number of files with random names and the same file extension (e.g., file1.txt, file2.txt...fileN.txt). How could you rename them all reliably with a random string?
Such as, ...
0
votes
0
answers
41
views
how to apply a text string in a variable with rename function
When using the PHP rename function I need to use text in a variable in the rename, but I can only get the rename to work when I manually enter the text, for example
If I use this
$original_file_name = ...
1
vote
1
answer
34
views
Rename several columns using start with in r
I want to rename multiple columns that starts with the same string.
However, all the codes I tried did not change the columns.
For example this:
df %>% rename_at(vars(matches('^oldname,\\d+$')), ~ ...
0
votes
1
answer
15
views
renaming a 7zip extracted folder error Access i denied R
I extracted a TxtinOut named folder using the following cmd in R
shell('7z x D:/Region02/test.7z -oD:/Region02 -r -y')
I want to rename this folder TxtinOut to New_Name. I tried file.rename() but ...
1
vote
1
answer
37
views
Powershell script to rename Files adding Last Modified date to name, script won't run in sub directories
I have an old server archived and would like to rename all the files by adding the last modified date to the file name.
There are many layers of folders in the directory structure.
I have tried a few ...
0
votes
0
answers
19
views
badzipfile / shutil read error : this is not a zip file
I am creating with Winrar an archive that contains a specific file.
Then I modify the extension of the archive to .exe. ( for simulating having a packed installer)
I wrote a python script to modify ...
0
votes
0
answers
31
views
Error when renaming columns with plyr in a loop in R
I found similar error but it seems the problem is not the same.
for (i in colnames(t[,4:ncol(t)])) {
for (j in poids_teff$station) {
if (i == j) {
t <- plyr::rename(t, c(i = poids_teff$...
0
votes
1
answer
24
views
Rename Word mailmerge fields in VBA
I want to rename mergefields in a Word document.
I use the following script (based on Change value of Word MailMerge field using VBA). I run the script and I see the fieldsnames replaces by the new ...
0
votes
1
answer
25
views
Why are either mmv or rename changing multiple file names on Fedora 35?
On my Fedora 35 system neither of the following are working.
I have about twenty or so jpg files in a directory, and I wish to add the name of a website to each image after its main title.
I am ...
1
vote
4
answers
61
views
Remove extra square brackets from folder names
I have a series of folders, named as follow
[[1254170]][folder1]
[[1212340]][folder2]
[[3245417]][folder3]
I want to rename them all as
[1254170]folder1
[1212340]folder2
[3245417]folder3
or at least
...
-2
votes
0
answers
31
views
Pandas dynamic daframe names assignment
I'm trying to uniquely name dataframes (the code bellow works but...)
is there a way to make this shorter.. My symbol_list could be very long
symbol_list = ['HNTUSDT', 'GMTUSDT', 'LUNAUSDT']
def ...
0
votes
0
answers
13
views
When moving files into Termux from downloaded drive files the names end up preserving version number. How can I avoid this or mitigate it?
When downloading files from Google Drive onto my phone I can then pulldown the notification bar and choose locate files, then select them and click the sandwich in the upper left hand corner to move ...
0
votes
2
answers
26
views
How do I replace values in a category by group in R
Hi I have a dataframe sleep_data where I am attempting to change Id values to user1:user33 based on groups. So where Id == 1503960366 change to user_1, Id == 1644430081 change to user_2, etc etc.
I am ...
0
votes
1
answer
33
views
Add suffix to some columns in 1st dataframe based on values in 2 columns in 2nd dataframe
Task1: I want to add a suffix to some columns in the 1st dataframe based on the values in 2 columns in a second dataframe.
My psuedocode would be:
if (dict.df$source == 'cre' or dict.df$source == '...
0
votes
0
answers
14
views
How to rename multiple strings and skip errors if it doesn't apply
I am trying to take a list of free-form text entries of names, some of which have been mispelled, some not, but I want them all to be rewritten in the exact way. I've written a number of possible ...
0
votes
2
answers
26
views
How can I restructure file names on bulk via batch script
I have 324 files on a Windows 10 machine which are named in the following pattern:
[7 Numbers] [Space] [Last name] [Space] [First name]
And I need them to be:
[Last name] [Space] [First name] [Space] ...
0
votes
0
answers
8
views
Relabeling colnames within one matrix based on the colnames being present in a second matrix
I have two matrices A and B. Each are 38,000 x 10,000. I've combined A and B together by columns to make a matrix of 38,000 x 20,000. Each of the column names are unique and are formatted as follows: ...
0
votes
0
answers
11
views
Procedure 'sp_renamedb' not found (in sybaseIQ DB)
my sybaseIQ machine comes with db name "iqdemo"
as it shows after connect:
dbisql -c "UID=DBA ;PWD=sql123 ;ServerName=SybaseIQ0_iqdemo ;host=10.10.92.18:2738" -nogui
(DBA)> ...
0
votes
1
answer
29
views
how to multiply and rename one image to n-times in ffmpeg
for making a video i want to multiply one image of a folder e.g. for 30fps and 30sec to 900 times with an uprising index.
How can i copy on image n-times and rename it with ffpeg?
How i did it by now:
...
0
votes
0
answers
53
views
Rename column within function in r using dplyr
In this case, I have a loop that triggers a function, which in turn triggers a function that collects the data.
One weird thing, is I cannot rename the columns in the dataset created - d. Bascially I ...
0
votes
0
answers
8
views
Force move folders matching pattern to another location with same name
I am trying to move some directories/files matching the pattern /path/to/dir/*/YYYYMMDD to a junk path using the mv -f command:
mv -f /path/to/dir/*/YYYYMMDD /path/to/junk/
Within those folders in /...
0
votes
0
answers
19
views
Batch Rename Folders Randomly
I need some help to create a batch file that renames all folders in a specific directory to random names/numbers like "!random!" do. I know how to do with files but not with folders. Any ...
0
votes
3
answers
42
views
R function to rename multiple values
I have a dataset with food items, I need a function to format the different names of 1 fruit to one single name. For example, dataset has Red Apple, Dried Apple, Green Apple, I want all these to ...
0
votes
1
answer
44
views
replace the header line of several sequences in a fasta file and replace them with the species names stored in a list (.txt)
I have a fasta file with several sequences, but the first line of all the sequences start with the same string (ABI) and I want to change and replace it with the names of the species stored in a ...