Questions tagged [file-rename]

rename-file means changing name of a file

renaming a file means changing name of a file. Almost all operating systems allow to change the name of a file after it has been created with some other name. Usually a platform provides a GUI and a CLI interface to allow users to rename a file, as well as API interfaces to rename a file programmatically.

1496 questions
-2
votes
1 answer

How to rename bulk files in a specific format?

I've a set of image files, which I need to renamed in a specific format. Currently they were like: img (1).jpg img (2).jpg img (3).jpg img (4).jpg img (5).jpg ... But I need to rename them…
Althaf
  • 143
  • 2
  • 11
-2
votes
2 answers

Batch to rename files one after another

I need a code to rename one file after another with each run. I made a working code but it can be used only for limited amount of files. I would like it to be good for many many files (e.g. instead of copying if then command over and over…
Invictus
  • 13
  • 3
-2
votes
1 answer

Python: how to rename a file in a folder?

I have a list of file like the following 'TRIAL_20134_75690_TOTAL_2018-08-12-17-18.csv' I want to rename them the parte after the last underscore, such as the file will be renamed like: 'TRIAL_20134_75690_TOTAL.csv'
emax
  • 6,965
  • 19
  • 74
  • 141
-2
votes
2 answers

Rename File Upload PHP

I am using W3Schools example of file upload using PHP, I know they aren't the best when it comes to coding as it can be outdated and bad etc., but I don't need anything too fancy. But I am wondering how to change the file name when it is…
TheWelshManc
  • 495
  • 3
  • 13
-2
votes
1 answer

Rename a bulk of files based on a txt file

I am trying to rename some configuration files that reside into a folder. Some of them have the ".disabled" extentions, some don't. My intention: foreach file in files-to-change.txt (relative path to the .config file, one under the other), if the…
Alex
  • 75
  • 7
-2
votes
1 answer

Python match pattern to rename file

I have couple of files with like this, llm_rc_v3212.xml, llm_ds_v3232.xml. Names can be anything. however, common parameter would be_v3212. I want to match this number and replace it (ideally renaming the file). How can i match this pattern with…
tgcloud
  • 857
  • 6
  • 18
  • 37
-2
votes
4 answers

Shell Script for Bulk renaming of files

I want to recursively rename all files in directory path by changing their prefix. For…
Vikash
  • 213
  • 5
  • 15
-2
votes
2 answers

Image downloader + rename based on CSV

What I have is the following data CSV data (2 columns) ImageURL1, Name A ImageURL1, Name B ImageURL2, Name C I want to download the image found at ImageURL1, and have two images file as Name A and Name B Is there a way to do this? Ideally, I…
Vincent Tang
  • 3,758
  • 6
  • 45
  • 63
-2
votes
2 answers

PHP rename files contain special characters "/" and " "

How to rename file with name containing "/", in PHP example : "A / B" $filename= "A / B"; rename("1.html", $filename.".html"); doesn't work!
filip
  • 41
  • 6
-2
votes
2 answers

Rename file in visual basic

I have the following code, it is not doing what I want it to do. Can anyone help? This is a timer event project. The application is collecting value and writing it to the .csv file. This is what I am trying to do: If .txt file is missing, rename…
Smoky2016
  • 21
  • 1
  • 10
-2
votes
3 answers

Rename first part of filename using batch

I have some problem writing a code for a batchfile that will replace the first part of a file name. let say we have the files: abcd123.txt abcd345.txt the numeric part(and the extensions) is the part I want to keep and change it to…
MSm
  • 125
  • 4
-2
votes
1 answer

Renaming multiple files depending on current name

Bit of a speculative question, I have several files that need renaming each day. I'm wondering if it's possible to re-name them to the required spec automatically using a .bat or otherwise simple script. An example filename would be: OKS-SABB MT940 …
-2
votes
1 answer

file rename, python batch-processing

I'm new to coding, and only know VBA at best. However I would like a python script which will rename all the excel files in a folder. It needs to include the date the file was last modified at the start of the string. The date format will be…
-2
votes
1 answer

Batch file to move a number of files, then replace each of them with one file of another type while letting them keep their original name

First off I want to say that -I didnt ever create a batch file yet, but I am really willing to learn -I am not even sure if what i want to do is possible with a batch file What i want to do is the following: I want to replace a number of files of…
Eric
  • 1
  • 1
-2
votes
1 answer

How can I edit the name of a file (that will be downloaded) via php or javascript?

I am trying to make a script that will rename a file based off what a user submitted in a textbox and download it (I do not want it to affect other people's downloads though, so I want the name of the file to only be based off what they submitted ).…
n123q45
  • 3
  • 1