Windows 10: Command Prompt Renaming Files with " and ' in the file name.

Discus and support Command Prompt Renaming Files with " and ' in the file name. in Windows 10 Network and Sharing to solve the problem; I have a folder with thousands of files with in it. I have been trying to run various batch commands on the files within this folder, however some of... Discussion in 'Windows 10 Network and Sharing' started by TerranAnd, Jan 7, 2021.

  1. TerranAnd Win User

    Command Prompt Renaming Files with " and ' in the file name.


    I have a folder with thousands of files with in it.

    I have been trying to run various batch commands on the files within this folder, however some of these files have " and ' within their filename.

    Is there some way to either eliminate the problem characters from within the command prompt from all files within the folder or a change to the syntax that I am using so that those characters dont disrupt the syntax.

    Here is an example of the type of command and the types of file names within this folder.
    The File names in this example are;
    Test "Run 2" Set '1'.txt

    Test "Run 2" Set '2'.txt
    Test "Run 3" Set '1'.txt
    Test "Run 3" Set '2'.txt

    So if I wanted to run a command to rename these files I would use the following however because of the quotes I get syntax errors.
    ren “Test "Run 2" Set '1'.txt“ “Run 2 Example 1.txt"

    ren “Test "Run 2" Set '2'.txt“ “Run 2 Example 2.txt"

    ren “Test "Run 3" Set '1'.txt“ “Run 3 Example 1.txt"
    ren “Test "Run 3" Set '2'.txt“ “Run 3 Example 2.txt"

    Is there some way in command prompt to fix this syntax? Or less desirable is there some way to mass remove problematic characters from the names of files in command prompt or powershell


    Thanks for your Time.

    :)
     
    TerranAnd, Jan 7, 2021
    #1
  2. Squirrely Win User

    Gathering Names Of Multiple Files

    Try this snippit in a batch file:

    You have to specify where to go with the batch file, which is what the cd command is for. Then, once the prompt is in that directory, the last command lists all of the files (including directories) in the list_of_files.txt text file, since dir is a command, not the directory location. *Smile Command Prompt Renaming Files with " and ' in the file name. :)

    Edit: Also, if your directory has spaces, you may have to put the directory in quotes, such as:

     
    Squirrely, Jan 7, 2021
    #2
  3. 10fused Win User
    Command Prompt Input Error renaming update files

    Command Prompt Renaming Files with " and ' in the file name. [​IMG]


    this was driving me crazy and the virtual assistant's suggestions bore no fruit

    so I thought I'd try this

    Cant install windows 10 updates - Microsoft Community



    Command Prompt Renaming Files with " and ' in the file name. [​IMG]



    OPPPPS! How do I fix this back to original config or carry out the renaming process correctly to try it?

    Thanks
     
    10fused, Jan 7, 2021
    #3
  4. Command Prompt Renaming Files with " and ' in the file name.

    Command Prompt Input Error renaming update files

    By the way this looks, you have already renamed the SoftwareDistribution folder with the command where you mistyped SoftwareDistribution.ol.

    Try this: Code:
    See if that works.
     
    ArazelEternal, Jan 7, 2021
    #4
Thema:

Command Prompt Renaming Files with " and ' in the file name.

Loading...
  1. Command Prompt Renaming Files with " and ' in the file name. - Similar Threads - Command Prompt Renaming

  2. renaming multiple files using the command prompt

    in Windows 10 Network and Sharing
    renaming multiple files using the command prompt: Hello,I had a few dozen files that used a naming convention beginning with an abbreviation for a city in this case, WI and then an alpha-numeric sequence that was unique to each file. I wanted to rename the files to include the entire city name in this case, Windsor without...
  3. renaming multiple files using the command prompt

    in Windows 10 Gaming
    renaming multiple files using the command prompt: Hello,I had a few dozen files that used a naming convention beginning with an abbreviation for a city in this case, WI and then an alpha-numeric sequence that was unique to each file. I wanted to rename the files to include the entire city name in this case, Windsor without...
  4. renaming multiple files using the command prompt

    in Windows 10 Software and Apps
    renaming multiple files using the command prompt: Hello,I had a few dozen files that used a naming convention beginning with an abbreviation for a city in this case, WI and then an alpha-numeric sequence that was unique to each file. I wanted to rename the files to include the entire city name in this case, Windsor without...
  5. copy file with new name in command prompt

    in Windows 10 Network and Sharing
    copy file with new name in command prompt: To copy a file with a new name in the command prompt, you can use the copy a command followed by the source file path and the destination file path. Here's the syntax:cssCopy codecopy [source_file_path] [destination_file_path]Replace [source_file_path] with the path of the...
  6. copy file with new name in command prompt

    in Windows 10 Gaming
    copy file with new name in command prompt: To copy a file with a new name in the command prompt, you can use the copy a command followed by the source file path and the destination file path. Here's the syntax:cssCopy codecopy [source_file_path] [destination_file_path]Replace [source_file_path] with the path of the...
  7. copy file with new name in command prompt

    in Windows 10 Software and Apps
    copy file with new name in command prompt: To copy a file with a new name in the command prompt, you can use the copy a command followed by the source file path and the destination file path. Here's the syntax:cssCopy codecopy [source_file_path] [destination_file_path]Replace [source_file_path] with the path of the...
  8. copy file with new name in command prompt

    in Windows 10 Gaming
    copy file with new name in command prompt: Hi all, This is a bit of an unusual question. I use a radio automation program called Zara, and am trying to get it to load certain sweeper files automatically. The files where these are stored have a ZSL extension. I have them stored currently in my music folder in a Zara...
  9. copy file with new name in command prompt

    in Windows 10 Software and Apps
    copy file with new name in command prompt: Hi all, This is a bit of an unusual question. I use a radio automation program called Zara, and am trying to get it to load certain sweeper files automatically. The files where these are stored have a ZSL extension. I have them stored currently in my music folder in a Zara...
  10. copy file with new name in command prompt

    in Windows 10 Network and Sharing
    copy file with new name in command prompt: Hi all, This is a bit of an unusual question. I use a radio automation program called Zara, and am trying to get it to load certain sweeper files automatically. The files where these are stored have a ZSL extension. I have them stored currently in my music folder in a Zara...