Efficient File Name Changes: How to Automate the Process with Programming

  • Thread starter Thread starter n1person
  • Start date Start date
  • Tags Tags
    File
AI Thread Summary
The discussion centers on a user seeking a method to rename a large number of text files from a specific format (KJ(number)-j(another number).txt) to a simpler format ((number)(another number).txt). The user expresses concern about the inefficiency of manually opening and copying contents between files. Suggestions include using programming functions like the rename function in C, which allows for file renaming, and a recommendation for a Windows file manager add-on called "multiren" that could facilitate batch renaming. The conversation highlights the need for efficient file management solutions for bulk renaming tasks.
n1person
Messages
144
Reaction score
0
Hello all,

I have another little computer problem to deal with. I have a folder full of files (over a thousand) with the basic form KJ(number)-j(another number).txt, and I want to change the style to (number)(another number).txt. Is there any simple way to do this as the only way I can think of is a program which opens the file, opens a new file, copies the contents from the open file to the new file, and closes the two files, which seems timely and rather inefficient.

Thanks for your help!
 
Technology news on Phys.org
There is also the more general problem of turning (2 random letters)(number)-(2 other random letters)(another number).txt --> (number)(another number).txt
 
<io.h> or <stdio.h>

int rename(
const char *oldname,
const char *newname
);

Such things can be located just by googling.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
20
Views
3K
Replies
18
Views
2K
Replies
8
Views
2K
Replies
5
Views
2K
Replies
4
Views
1K
Replies
1
Views
2K
Back
Top