Answer the question
In order to leave comments, you need to log in
How to remove dash in file name?
There is a file te-st.txt how to remove a dash in the file name so that the file is of this type test.txt using a batch file? Provided that there are a lot of such files with a dash
For example
ert-ert.txt
Oto-to.txt
...
Answer the question
In order to leave comments, you need to log in
For the current directory:
Get-ChildItem *.txt | Rename-Item -newname {$_.name -replace '-',''}
The name of the desired directory can be specified in the first cmdlet...
I also tried with images in jpg format, but it did not work. Launched from PowerShell in Windows 10 in the same directory as the files, changed txt to jpg. Maybe there is a condition that the files start with fi, but my names are different?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question