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,177   Active Members: 4
          Welcome to our newest member, EzraGilchr.

          Today's Birthdays

          Collapse

          There are no members with birthdays today.

          Top Active Users

          Collapse

          There are no top active users.
          widgetinstance 184 (More Posts) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X