Wednesday, December 9, 2020

Renaming filenames, remove leading characters

This superuse post describes how a set of forward slashes (/) can be used to delete leading characters (except .) from a file name. One slash is required for each character to be deleted. I've confirmed the behavior on a Windows 10 machine.

ren "abc-*.txt" "////*.txt"
  abc-123.txt        --> 123.txt
  abc-HelloWorld.txt --> HelloWorld.txt


 ren "????*.*" "////*.*"

No comments:

Post a Comment

Creating a LAMP stack on AWS Free Tier

  https://shawn-shi.medium.com/how-to-host-a-lamp-web-application-server-on-aws-ec2-for-free-8f6fc61463ed#:~:text=Its%20free%20tier%20allows...