📎 AI Summary:
The thread discusses how to rename multiple files by deleting their first two characters. The original poster asks for a method to accomplish this, and a responder suggests using the Bulk Rename Utility, providing a link and instructions based on system architecture. Another user recommends using PowerShell, offering a sample command for batch renaming files and explaining how to modify it to remove two characters, with a positive note on its effectiveness.
The thread discusses how to rename multiple files by deleting their first two characters. The original poster asks for a method to accomplish this, and a responder suggests using the Bulk Rename Utility, providing a link and instructions based on system architecture. Another user recommends using PowerShell, offering a sample command for batch renaming files and explaining how to modify it to remove two characters, with a positive note on its effectiveness.
Solution
Try Power shell
And Run this in your desired directory
gci *.txt | rename-item -newname { [string]($_.name).substring(1) }
Explanation: - gci *.txt collects all *.txt-files in the actual directory.
- rename-item -newname renames the piped results from the gci-command with the string that is generated in {}
- string.substring(1) takes the filename starting after the first character
When you want to remove the first Two characters, just replace the (1) after 'substring' with (2). In power shell, the whole filename is treated as a string(-object), points included.
If you find this answer helpful, then like this post
And Run this in your desired directory
gci *.txt | rename-item -newname { [string]($_.name).substring(1) }
Explanation: - gci *.txt collects all *.txt-files in the actual directory.
- rename-item -newname renames the piped results from the gci-command with the string that is generated in {}
- string.substring(1) takes the filename starting after the first character
When you want to remove the first Two characters, just replace the (1) after 'substring' with (2). In power shell, the whole filename is treated as a string(-object), points included.
If you find this answer helpful, then like this post
BurrWalnut
Essential Member
Member details
- Joined
- Nov 14, 2008
- Messages
- 110
Download the free 32-bit or 64-bit version of Bulk Rename, here http://www.bulkrenameutility.co.uk/Main_Intro.php
To check if you have 32-bit or 64-bit, simply right-click Computer, click Properties.
To check if you have 32-bit or 64-bit, simply right-click Computer, click Properties.
Gavin Oscur
Well-Known Member
Member details
- Joined
- Apr 5, 2014
- Messages
- 78
Try Power shell
And Run this in your desired directory
gci *.txt | rename-item -newname { [string]($_.name).substring(1) }
Explanation: - gci *.txt collects all *.txt-files in the actual directory.
- rename-item -newname renames the piped results from the gci-command with the string that is generated in {}
- string.substring(1) takes the filename starting after the first character
When you want to remove the first Two characters, just replace the (1) after 'substring' with (2). In power shell, the whole filename is treated as a string(-object), points included.
If you find this answer helpful, then like this post
And Run this in your desired directory
gci *.txt | rename-item -newname { [string]($_.name).substring(1) }
Explanation: - gci *.txt collects all *.txt-files in the actual directory.
- rename-item -newname renames the piped results from the gci-command with the string that is generated in {}
- string.substring(1) takes the filename starting after the first character
When you want to remove the first Two characters, just replace the (1) after 'substring' with (2). In power shell, the whole filename is treated as a string(-object), points included.
If you find this answer helpful, then like this post