Announcement

Collapse
No announcement yet.

Is there a way to....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Try this J
    Code:
    @echo off
    for %%a in (*.mkv) do (
        echo Found %%a
        echo - Making DIR %%~na
        mkdir "%%~na"
        echo - Moving %%~na.* to %%~na
        move "%%~na.*" "%%~na"
    )
    pause
    change *.mkv for any ext you like
    ie
    *.mkv;*.avi
    *.mkv;*.avi;*.divx

    it will move like named files into the same dir
    so if you have
    Iron_Man_3.mkv
    Iron_Man_3.srt
    it will move them together..


    if you want to change _ to spaces from the dir try this
    Code:
    @echo off
    setlocal enabledelayedexpansion
    for %%a in (*.mkv) do (
        echo Found %%a
        echo - Making DIR %%~na
        mkdir "%%~na"
        echo - Moving %%~na.* to %%~na
        move "%%~na.*" "%%~na"
        set foldername=%%~na
        echo - Renaming DIR to "!foldername:_= !"
        ren "!foldername!" "!foldername:_= !"
    )
    pause
    This one will rename the files inside the folder too... hopefully
    Code:
    @echo off
    setlocal enabledelayedexpansion
    for %%a in (*.mkv) do (
        echo Found %%a
        echo - Making DIR %%~na
        mkdir "%%~na"
        echo - Moving %%~na.* to %%~na
        move "%%~na.*" "%%~na"
        set foldername=%%~na
        echo - Renaming DIR to "!foldername:_= !"
        ren "!foldername!" "!foldername:_= !"
        cd "!foldername:_= !"
        for %%b in (*) do (
        	set filename=%%b
            echo - Renaming file "!filename!" to "!filename:_= !"
        	ren "!filename!" "!filename:_= !"
        )
        cd ..
    )
    pause
    Dun ask me where I keep all this info... I dunno where its all stored lmao
    Last edited by Sirex; 4 Nov 2013, 08:44 PM.




    I'm not insane. I'm just overwhelming!

    ·····••••• Support Cainslair. Donate here!•••••·····
    ·····••••• and get extra options! •••••·····

    Comment


      #17
      Thanks for those Sirex! What changes do I have to make to them if I don't want - or _? My file names with multiple words simply have spaces, and so do the folder names.

      Comment


        #18
        Use the first one, it does no stripping.
        Simple as that




        I'm not insane. I'm just overwhelming!

        ·····••••• Support Cainslair. Donate here!•••••·····
        ·····••••• and get extra options! •••••·····

        Comment


          #19
          Originally posted by Sirex View Post
          Use the first one, it does no stripping.
          Simple as that
          Will give it a test run this weekend. Thanks!

          Comment

          Cain's Lair Forums Statistics

          Collapse

          Topics: 26,187   Posts: 269,850   Members: 6,183   Active Members: 7
          Welcome to our newest member, Fermin13Q.

          Today's Birthdays

          Collapse

          Top Active Users

          Collapse

          There are no top active users.

          More Posts

          Collapse

          • Reply to Hi guys!
            by Evil_T0NY {CLR}
            I've been Alpha and will be Beta testing the Delta Force game. It's been really getting good reviews! Definitely a good Battlefield feel to it like the...
            14 Nov 2024, 08:50 PM
          • Reply to Hope your all OK over there
            by Apache Warrior
            We had 17 inches of rain from the storm on November 7, 2024.
            Apache
            11 Nov 2024, 07:55 AM
          • Reply to Hope your all OK over there
            by Sirex
            Aye, I'm inclined to agree with that lmao
            Gone are the days of warm summers and snow filled winters here, nothing but rain and wind for 8mths of...
            10 Nov 2024, 08:53 PM
          • Reply to Hope your all OK over there
            by Apache Warrior
            Now we have had a lot of flooding in this area and there are still a lot of houses that have not been repaired. Must be the apocalypse.
            ...
            8 Nov 2024, 09:23 AM
          Working...
          X