Windows 10: PowerShell script for recursively adding a specific extension to files that have no extension

Discus and support PowerShell script for recursively adding a specific extension to files that have no extension in Windows 10 Software and Apps to solve the problem; I have the below PowerShell script to add ".dcm" to any files found in subfolders that do not have an extension. However, when it is run, I get an... Discussion in 'Windows 10 Software and Apps' started by Robert Eddy, Jan 18, 2024.

  1. PowerShell script for recursively adding a specific extension to files that have no extension


    I have the below PowerShell script to add ".dcm" to any files found in subfolders that do not have an extension. However, when it is run, I get an error for all of the files found that says:Rename-Item : A positional parameter cannot be found that accepts argument '+'.At C:\Temp\AddDcm.ps1:4 char:9 + Rename-Item -Path $file.FullName -NewName $file.FullName + ". ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: : [Rename-Item], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,M

    :)
     
    Robert Eddy, Jan 18, 2024
    #1

  2. Shortcut to print without opening Visio File (VSDX extension)?

    Since, without opening file, I can print VSDX file by following steps:

    1. open file with Internet Explorer
    2. get Internet Explorer to print.
    Is there a shortcut ? My wish to have:

    1. right click file with VSDX extension and print just like Office documents?
    2. VBS using COM
    3. Powershell script
    Thanks Ahead!
     
    Sunny Schindler, Jan 18, 2024
    #2
  3. Bulk delete file extensions

    Hi MD. I'm Greg, an installation specialist, 10 year Windows MVP, and Volunteer Moderator here to help you.

    Are you wanting to mass delete files with certain extensions, or delete or hide the extensions themselves? We get asked both.

    For mass deleting files by extension using Command Prompt see this tutorial:

    https://sumtips.com/tips-n-tricks/recursively-d...

    To remove the file extensions themselves see this tutorial:

    https://smallbusiness.chron.com/command-line-re...

    I hope this helps. Feel free to ask back any questions and keep me posted. I will keep working with you until it's resolved.

    ________________________________________________________

    Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly
    research any product advertised on the sites before you decide to download and install it.
     
    Greg Carmack - Windows MVP 2010-20, Jan 18, 2024
    #3
  4. PowerShell script for recursively adding a specific extension to files that have no extension

    Can a file extension(.flv) be added to Default Program Associations.

    Hi Fred,



    Thank you for posting your query on Microsoft Community.



    I understand that you are facing issues associating a particular file extension with a program on Windows 10. I apologize for the inconvenience caused to you.

    To assist you better, please provide the information:

    When you say that "Default Program Associations", are you referring to the list of default applications in default programs settings?



    I want you to be informed that all the file extensions is listed in the default program settings which is displayed under
    Associate a file type or protocol with a program.



    In default program list, all the programs or application will be listed. Then we can select each program as default program for opening a particular file.

    I suggest you to refer to the below steps to make default program for a particular file extension.

    1. Type "Control Panel" without the quotes in search box and click on it.

    2. Click on Programs.

    3. Then click on Default Programs and click on Choose Default for this Programs.

    4. Select .flv file from the list.

    Also you can try other steps to associate the a particular extenstion with the program.

    1. Type "Control Panel" without the quotes in search box and click on it.

    2. Click on Programs.

    3. Then click on Associate a file type or protocol with a program
    and search for .flv extension from the list.

    4. Click on .flv and then click on Change Program.



    Reply to us with the information, so that we can assist you better.

    Let us know if you need any further assistance on Windows related issues and we will be glad to help.
     
    Nyima Yonten, Jan 18, 2024
    #4
Thema:

PowerShell script for recursively adding a specific extension to files that have no extension

Loading...
  1. PowerShell script for recursively adding a specific extension to files that have no extension - Similar Threads - PowerShell script recursively

  2. PowerShell script for recursively adding a specific extension to files that have no extension

    in Windows 10 Network and Sharing
    PowerShell script for recursively adding a specific extension to files that have no extension: I have the below PowerShell script to add ".dcm" to any files found in subfolders that do not have an extension. However, when it is run, I get an error for all of the files found that says:Rename-Item : A positional parameter cannot be found that accepts argument '+'.At...
  3. PowerShell script for recursively adding a specific extension to files that have no extension

    in Windows 10 Gaming
    PowerShell script for recursively adding a specific extension to files that have no extension: I have the below PowerShell script to add ".dcm" to any files found in subfolders that do not have an extension. However, when it is run, I get an error for all of the files found that says:Rename-Item : A positional parameter cannot be found that accepts argument '+'.At...
  4. Ad Blocking Extensions

    in Windows 10 Gaming
    Ad Blocking Extensions: Dear Microsoft Members, Microsoft and ExpertsMy questions are: Because of lot of concerns about protecting data in OneDrive and on computer hard disc, how safe are the use of free adblockers on Microsoft Edge and Chrome browsers? If so what do you recommend for Microsoft Edge...
  5. Ad Blocking Extensions

    in Windows 10 Software and Apps
    Ad Blocking Extensions: Dear Microsoft Members, Microsoft and ExpertsMy questions are: Because of lot of concerns about protecting data in OneDrive and on computer hard disc, how safe are the use of free adblockers on Microsoft Edge and Chrome browsers? If so what do you recommend for Microsoft Edge...
  6. Ad Blocking Extensions

    in Windows 10 Network and Sharing
    Ad Blocking Extensions: Dear Microsoft Members, Microsoft and ExpertsMy questions are: Because of lot of concerns about protecting data in OneDrive and on computer hard disc, how safe are the use of free adblockers on Microsoft Edge and Chrome browsers? If so what do you recommend for Microsoft Edge...
  7. rename multiple files in a batch script to a new extension keeping the old extension as...

    in Windows 10 Network and Sharing
    rename multiple files in a batch script to a new extension keeping the old extension as...: I want to rename a file with a new extension but keep the exiting extension as part of the new file name. Example xxxxxx.xxx.xxx.f000 rename to xxxxxx.xxx.xxx.f000.123."ren * *.123" just replaces the .f000 with .123.I want to keep the .f000 as part of the new filename.The...
  8. My files have an ".bccebddabd" added to their extensions.

    in Windows 10 Network and Sharing
    My files have an ".bccebddabd" added to their extensions.: I had reinstalled windows 10 and all every files in "users" folder that I was manually backup Pictures/Documents/Videos subfolders have an ".bccebddabd" added to their extensions. I try renamed them back to their original extensions and still can not open it. How is this...
  9. .processed file extension added to many files

    in Windows 10 Support
    .processed file extension added to many files: I searched online, but have found absolutely nothing that helps! Just noticed that a lot of my files suddenly have a double extension. Somehow .processed was added to the original extension. All the files affected seem to be in the "Downloads" folder, as far as I can tell....
  10. Windows Script Hoist - no script engine for file extension .js

    in Windows 10 Support
    Windows Script Hoist - no script engine for file extension .js: I am using Windows 10 Home on a HP i3 laptop. Just recently I have started receiving an error pop-up which says "Windows Script Host - There is no script engine for file extension ".js"". There doesn't seem to be a pattern to when the error appears, but it is quite...