Sometimes, installation programs extract files to temporary directories and leave a large length of long file names. PowerShell is a command-line utility, much like Command Prompt.
You can use PowerShell to run for automation and to perform various administrative tasks. Another simple method is to remove a specific number of characters from the beginning of long file names. This is an ideal option if file names are not unique in nature, and they have different text patterns. The above command will strip off the first 16 characters from each file name.
To limit the above command to only specific extensions for example, only PDF documents , you can make some minor changes to it as shown below -. You may replace. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. Any additional feedback? Collectives on Stack Overflow. Learn more. How to delete "The file name is too long. Asked 4 years, 8 months ago. Active 4 years, 8 months ago. Viewed 31k times.
Improve this question. Ashish Dadhich Ashish Dadhich 4, 4 4 gold badges 15 15 silver badges 25 25 bronze badges. Ashish, while I laud your desire to increase the collective knowledge of StackOverflow, this is due to its non-programming nature probably more suited to SuperUser. So I and a few others by the looks of it are nudging it over to there.
Add a comment. Active Oldest Votes. It's Empty??? Now run the command of remove directory which we created for mapping rmdir deleteLongFilesDir from command line.
0コメント