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

  • Thread starter Thread starter n1person
  • Start date Start date
  • Tags Tags
    File
Click For Summary

Discussion Overview

The discussion revolves around automating the process of renaming a large number of files in a specific format using programming or software tools. Participants explore various methods to achieve this efficiently, considering both programming solutions and third-party applications.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes a need to rename files from a format of KJ(number)-j(another number).txt to (number)(another number).txt, expressing concern about the inefficiency of manually copying file contents.
  • Another participant expands the problem to a more general case of renaming files from a format of (2 random letters)(number)-(2 other random letters)(another number).txt to (number)(another number).txt.
  • A participant suggests using the C programming function rename() from or as a potential solution, indicating that such information can be found through online searches.
  • Another participant mentions a Windows file manager add-on called "multiren" that may assist with the renaming task, providing a link for further exploration.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the best approach to automate file renaming, with multiple methods and tools being proposed without agreement on a single solution.

Contextual Notes

The discussion does not clarify specific programming requirements or limitations of the suggested tools, nor does it address potential dependencies on operating system compatibility.

Who May Find This Useful

Individuals looking for efficient methods to rename large batches of files, particularly those with programming knowledge or interest in file management tools.

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.
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
5K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
8K