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, 07: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,182   Posts: 269,814   Members: 6,176   Active Members: 2
          Welcome to our newest member, 28Farrell8.

          Today's Birthdays

          Collapse

          There are no members with birthdays today.

          Top Active Users

          Collapse

          There are no top active users.

          More Posts

          Collapse

          • Reply to 6 years
            by Apache Warrior
            6 Mar 2024, 08:29 AM
          • Reply to 6 years
            by Sirex
            I think there is like a magical time span when bikes become worth a fortune.

            Yeah thought its now or never haha
            Just hit 2.5K miles...
            5 Mar 2024, 04:37 PM
          • Reply to Hey Guys...It's BrundleFly
            by Sirex
            Hey Brundle nice to see your post I remember you very well hows thing with you.

            Not a busy place here these days but its still up and occasionally...
            5 Mar 2024, 04:34 PM
          • Reply to Hell Let Loose
            by Sirex
            Hey nice to see you

            Its not a busy place, least not as busy as it once was but you still get the odd message posted every few weeks...
            5 Mar 2024, 04:31 PM
          • Reply to I had Open Heart Surgery!!
            by Sirex
            Wow its amazing how well the body can cope with things it deams normal.

            Hope your recovering well and back to full steam.

            OH...
            5 Mar 2024, 04:28 PM
          Working...
          X