Windows 10: REN command is not working

Discus and support REN command is not working in Windows 10 Network and Sharing to solve the problem; I have written a simple batch file to rename all of the files with a same file extension inside a folder with consecutive number starting with one... Discussion in 'Windows 10 Network and Sharing' started by Apollo JacksonJC, Apr 4, 2020.

  1. REN command is not working


    I have written a simple batch file to rename all of the files with a same file extension inside a folder with consecutive number starting with one provided by the user. It works correctly when I use it with files named like "[We-now] Do It - 783 [spa]".****, but when I try to use it in another folder with .mkv files, with file names like this "Now or Never - 130- Bryan's Return! Into Hell for Nairobi's fault! [1080p][x264][AAC][Eng-Sub]-df68.mkv" the command says it is not able to find the file. Same happens if I just try to run the REN command from a cmd

    Here is my code:


    setlocal enabledelayedexpansion



    REM //Setting working directory as current folder



    SET "wp=."



    REM // Asking user for extension to rename

    SET /P ext="Extension of files to rename: "



    REM // Asking user for the first number

    SET /P fn="Introduce first number: "

    SET /A i=%fn%

    SET /A k=1

    REM // We start renaming

    FOR %%J IN "%wp%\*.%ext%" DO CALL :rnaming "%%J"

    goto End






    :Rnaming

    SET aux=%~nf1

    ECHO %aux%

    ECHO Iteration %k% - Next name: %i%

    ECHO Renaming %~1

    ren "%aux%" "%i%.%ext%"

    SET /A i=%i%+1

    SET /A k=%k%+1



    :End


    Thanks in advance for any help!

    :)
     
    Apollo JacksonJC, Apr 4, 2020
    #1
  2. zbook Win User

    Programs not working

    In post 26 there were steps listed to fix the operating system corruption.
    Are you able to follow them?
    In post 29 was the suggested dism repair command.
     
    zbook, Apr 4, 2020
    #2
  3. Naki Win User
    GPU-Z what command line parameter ?

    Suggestion: /? (-?) and /help (-help) command-line arguments to show a list of all possible arguments in a small window. *Smile REN command is not working :)
     
    Naki, Apr 4, 2020
    #3
  4. ryanly Win User

    REN command is not working

    GPU-Z what command line parameter ?

    Current /? (-?) or / help (-help) parameter is invalid
     
    ryanly, Apr 4, 2020
    #4
Thema:

REN command is not working

Loading...
  1. REN command is not working - Similar Threads - REN command working

  2. This command not working: ren "A *.*" "*.*"

    in Windows 10 Network and Sharing
    This command not working: ren "A *.*" "*.*": This command is not working for me: ren "A *.*" "*.*" I don't get an error, but file names do not change. Is this command incorrect? https://answers.microsoft.com/en-us/windows/forum/all/this-command-not-working-ren-a/1cd44cf6-63ac-469d-bc41-7bbb2c21284e
  3. This command not working: ren "A *.*" "*.*"

    in Windows 10 Gaming
    This command not working: ren "A *.*" "*.*": This command is not working for me: ren "A *.*" "*.*" I don't get an error, but file names do not change. Is this command incorrect? https://answers.microsoft.com/en-us/windows/forum/all/this-command-not-working-ren-a/1cd44cf6-63ac-469d-bc41-7bbb2c21284e
  4. This command not working: ren "A *.*" "*.*"

    in Windows 10 Software and Apps
    This command not working: ren "A *.*" "*.*": This command is not working for me: ren "A *.*" "*.*" I don't get an error, but file names do not change. Is this command incorrect? https://answers.microsoft.com/en-us/windows/forum/all/this-command-not-working-ren-a/1cd44cf6-63ac-469d-bc41-7bbb2c21284e
  5. Access Denied on ren command in cmd

    in Windows 10 Gaming
    Access Denied on ren command in cmd: whenever i go into cmds and run it as admin, i type in cd c:\usersthen i do ren bartl "Bartlomiej Dudzik"but i get an Access Denied pop up???any tips or fixes?...
  6. Access Denied on ren command in cmd

    in Windows 10 Software and Apps
    Access Denied on ren command in cmd: whenever i go into cmds and run it as admin, i type in cd c:\usersthen i do ren bartl "Bartlomiej Dudzik"but i get an Access Denied pop up???any tips or fixes?...
  7. Access Denied on ren command in cmd

    in Windows 10 Installation and Upgrade
    Access Denied on ren command in cmd: whenever i go into cmds and run it as admin, i type in cd c:\usersthen i do ren bartl "Bartlomiej Dudzik"but i get an Access Denied pop up???any tips or fixes?...
  8. Command prompt ren c:\windows\system32\catroot2 catroot2.old failed

    in Windows 10 Gaming
    Command prompt ren c:\windows\system32\catroot2 catroot2.old failed: In attempting to fix update and other issues I was in the middle of commands with this command returned "access denied". The video I was learning from indicated this a problem and not the normal return....
  9. Command prompt ren c:\windows\system32\catroot2 catroot2.old failed

    in Windows 10 Software and Apps
    Command prompt ren c:\windows\system32\catroot2 catroot2.old failed: In attempting to fix update and other issues I was in the middle of commands with this command returned "access denied". The video I was learning from indicated this a problem and not the normal return....
  10. ren cmd syntax error

    in Windows 10 Network and Sharing
    ren cmd syntax error: I get a syntax error when trying to globally rename the directories below; for example, to change the "x" to a number, e.g., "2," These directories are contained in a sub-directory within my Documents, and these directories have sub-directories inside of them.The format of...

Users found this page by searching for:

  1. ren batch file not working

    ,
  2. win 10 ren command not working