中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-11-24 12:56
47,820 topics / 349,938 posts / today 0 new / 48,298 members
DOS批处理 & 脚本技术(批处理室) » [Help] Batch create directories by artist name and move songs into the directories
Printable Version  3,701 / 36
Floor16 flyinspace Posted 2008-08-20 14:23
银牌会员 Posts 517 Credits 1,206
Moving顶多 fails to move.

Hey. From now on, I'd better use move for such code. At least it's safer.
Floor17 iuiu Posted 2008-08-20 14:26
初级用户 Posts 15 Credits 32
Originally posted by huahua0919 at 2008-8-20 02:21 PM:
That is, your file name structure is problematic and cannot have special characters, otherwise it will become empty, so that's why I used copy.

Oh, but with copy, it's also nearly half less.
Floor18 huahua0919 Posted 2008-08-20 14:28
银牌会员 Posts 780 Credits 1,608
No translation needed as the content is already in English. Wait, no, wait. Wait, the input is in Chinese. Let's correct. The input is "不管你是copy还是move都会少,只要你的文件名有特殊字符" which translates to "Whether you use copy or move, it will be less, as long as your file name has special characters"
Floor19 iuiu Posted 2008-08-20 14:30
初级用户 Posts 15 Credits 32
Floor20 flyinspace Posted 2008-08-20 14:33
银牌会员 Posts 517 Credits 1,206
I read your post in floor 13.

I know where I made a mistake...

Sweat. I'm sorry for deleting all your Japanese songs.
Floor21 iuiu Posted 2008-08-20 14:42
初级用户 Posts 15 Credits 32
Hehe, it doesn't matter. The song can be downloaded again if it's lost. Is it because of the file name?
Floor22 iuiu Posted 2008-08-20 14:44
初级用户 Posts 15 Credits 32
Originally posted by huahua0919 at 2008-8-20 02:28 PM:
Whether you copy or move, there will be a loss, as long as there are special characters in your file name

Just did it again. With the batch script you wrote, the songs are not lost, but the songs that cannot be processed are still in place.
Floor23 flyinspace Posted 2008-08-20 14:45
银牌会员 Posts 517 Credits 1,206
Hmm, there's an issue with the encoding format.

There's a problem with my verification file deletion operation..

Then there was a typo in the setlocal part.. It was written as setloacl

So counting isn't possible.
Floor24 flyinspace Posted 2008-08-20 14:47
银牌会员 Posts 517 Credits 1,206
Originally posted by iuiu at 2008-8-20 02:44 PM:

Just did it again. Using the batch file you wrote doesn't miss songs, but the songs that can't be processed are still in the original place.


Missing songs are just because the del statement was used..

I have corrected the error on the 2nd floor.

You can try again.

His batch file is not that the unprocessable ones are still in the original place, but that the processed ones are also still in the original place. So it is recommended to use move...
Floor25 iuiu Posted 2008-08-20 14:53
初级用户 Posts 15 Credits 32
Originally posted by flyinspace at 2008-8-20 02:47 PM:

Shao Ge just because the del statement was used.

I have corrected the error on the 2nd floor.

You can try again.

His batch processing is not that it cannot be processed and is still in place, but that it is processed and still in place. So it is recommended to use move...

I changed his to move, part of it is put into the corresponding directory, and part is still in the original place, and there are many redundant empty folders in the generated folder.

I also tried your corrected version, and there are basically no redundant folders, but only 5 files are moved in, and more than 100 remain unchanged.

Found part of the reason, the file name format is singer space - space song title, I modified the batch processing you wrote, and now it just fails to move the file in, and the directory is okay.

[ Last edited by iuiu on 2008-8-20 at 03:00 PM ]
Floor26 flyinspace Posted 2008-08-20 15:01
银牌会员 Posts 517 Credits 1,206
Then? Are all your song names normal??

dir /b *.mp3 to check the format??
Floor27 iuiu Posted 2008-08-20 15:06
初级用户 Posts 15 Credits 32
Alison Moyet - Windmills Of Your Mind.mp3
Ann Breen - One Day When We Were Young.mp3
Atomic Kitten - Cradle.mp3
Avril Lavigne - I'm With You.mp3
Avril Lavigne - My Happy Ending.mp3
Bennie K - サンライズ.mp3
Berite Higgins - Casablanca.mp3
Beyonce Feat Jay - Z - Crazy In Love.mp3
Billy Joel - Just The Way You Are.mp3
Boa Verbal - Some Day One Day.mp3
Brian Hyland - Sealed With A Kiss.mp3
Britney Spears - Don’t Let Me Be The Last To Know.mp3
Britney Spears - Everytime.mp3
Bryan Adams - Everything I Do, I Do It For You.mp3
Bump Of Chicken - Supernova.mp3
Bump Of Chicken - アルエ.mp3
Bump Of Chicken - オンリー ロンリー グローリー.mp3
Carly Simon - Nobody Does It Better.mp3
Caron Nightingale - Promises Don't Come Easy.mp3
Christina Aguilera - Beautiful.mp3
Christina Aguilera - The Voice Within.mp3
Christina Milian - When You Look At Me.mp3
Corey Hart - Never Surrender.mp3
Crystal Kay Mflo - Reeewind.mp3
Darren Hayes - Creepin' Up On You.mp3
Delta Goodrem&brian Mcfadden - Almost Here.mp3
Dir En Grey - Dozing Green.mp3
Don Mclean - And I Love You So.mp3
Dreams Come True - Best Of Dreams Come True.mp3
Dreams Come True - やさしいキスをして.mp3
Duncan James & Keedie - I Believe In My Heart.mp3
Elton John - Candle In The Wind.mp3
Eva Cassidy - What A Wonderful World.mp3
Every Little Thing - きみの て.mp3
Every Little Thing - しあわせの飈景.mp3
Every Little Thing - また あした.mp3
Every Little Thing - 一日の始まりに....mp3
Every Little Thing - 冬がはじまるよ Feat. 槇原敬之.mp3
Every Little Thing - 恋をしている.mp3
Every Little Thing - 恋文.mp3
Faye Wong - Eyes On Me.mp3
Fools Garden - Lemon Tree.mp3
Forever Young - 01.We Will Rock You.mp3
Fuad Backovic Deen - In The Disco.mp3
Gareth Gates - Anyone Of Us.mp3
Garnet Crow - 夕月夜.mp3
Garnet Crow - 晴れ時計.mp3
Georges Michael - Faith.mp3
Gloria Gaynor - I Will Survive - Gloria Gaynor.mp3
Gorie With Jasmine&joann - Mickey.mp3
Gracie Fields - One Day When We Were Young.mp3
Groove Coverage - God Is A Girl.mp3
Groove Coverage - She.mp3
Il Divo - Unbreak My Heart (Regresa A Mi).mp3
Jamie Cullum - I Want To Be A Popstar.mp3
Jamie Scott - Searching.mp3
Janne Da Arc - 月光花.mp3
Jay Sean - Stolen.mp3
John Denver - Take Me Home, Country Roads.mp3
John Lennon - Only You.mp3
Joss Stone - You Had Me.mp3
Joy Enriquez - How Can I Not Love You.mp3
Justin Timberlake - Cry Me A River.mp3
Katie Melua - Crawling Up A Hill.mp3
Kelis Feat Andre 3000 - Millionaire.mp3
Kelly Clarkson - Because Of You.mp3
Kinki Kids - ね、がんばるよ。.mp3
Kiyasu Kohei - Terra.mp3
Kt Tunstall - Black Horse And The Cherry Tree.mp3
Kugimiya Rie - Ano Yume No Mukou He.mp3
Kylie Minogue - I Believe In You.mp3
Lene Marlin - Sitting Down Here.mp3
Lionel Richie - Hello.mp3
Louis Armstrong - What A Wonderful World.mp3
Love United - Live For Love United.mp3
Lucie Silvas - It's Too Late.mp3
Mai Kuraki - Secret Of My Heart.mp3
Mariah Carey & Whitney Houston - When You Believe (From The Prince Of Egypt Feat.Whitney Houston).mp3
Mariah Carey & Whitney Houston - When You Believe.mp3
Mariah Carey - Hero.mp3
Mariah Carey - I Still Believe.mp3
Mariah Carey - Touch My Body.mp3
Mariah Carey - Without You.mp3
Martine Mccutcheon - Perfect Moment.mp3
Maxi Priest - Fields.mp3
Michael Jackson - Heal The World.mp3
Michael Jackson - You Are Not Alone.mp3
Mihimaru Gt - 恋する気持ち.mp3
Minnie Driver - Invisible Girl.mp3
Minnie Riperton - Loving You.mp3
Misia By Sq - Holy Hold Me.mp3
Monkey Majik Mflo - Picture Perfect.mp3
Namie Amuro Feat. Mflo - Lovin' It.mp3
Namie Amuro Verbal - Lovin' It (Jc Hip Hop Mix).mp3
Natalie Imbruglia - Satellite.mp3
Natasha Bedingfield - These Words.mp3
Olivia Newton John - I Love You, Honestly Love You.mp3
Orange Range - Locolotion.mp3
Orange Range - W.mp3
Orange Range - チェスト.mp3
Orange Range - ミチシルベ~a Road Home~.mp3
Orange Range - ロコローション.mp3
Orange Range - 以心電信.mp3
Orange Range - 花.mp3
Paul Mccartney - Maybe I'm Amazed.mp3
Paul Simon - The Sound Of Silence.mp3
Phil Collins - Another Day In Paradise.mp3
Pu Shu - Radio In My Head.mp3
R Kelly - Happy People.mp3
R. Kelly - I Believe I Can Fly.mp3
Red Hot Chilli Peppers - Under The Bridge.mp3
Reira Starring Yuna Ito - Endless Story.mp3
Richard Marx - Right Here Waiting.mp3
Richard Tauber - One Day When We Were Young.mp3
Ricky Maritn - The Cup Of Life.mp3
Righteous Brothers - Unchanged Melody.mp3
Robbie Williams - Ain't That A Kick In The Head.mp3
Robbie Williams - Misunderstood.mp3
Rush Tribute - Anthem (Tribute).mp3
S Club 7 - Never Had A Dream Come True.mp3
Shakins Stevens - Because I Love You.mp3
Shania Twain - Forever And For Always.mp3
Sheena Easton - Almost Over You.mp3
Shimokawa Mikuni - Alone.mp3
Steve Brookstein - Against All Odds.mp3
Stevie Wonder - You Are The Sunshine Of My Life.mp3
Tara Maclean - Settling.mp3
The 411 - Dumb.mp3
The Calling - Wherever You Will Go.mp3
The Lovefreekz - Shine.mp3
The Temptations - Just My Imagination.mp3
The Zutons - Confusion.mp3
Toni Braxton - Breathe Again.mp3
Toni Braxton - Unbreak My Heart.mp3
Usher & Alicia Keys - My Boo.mp3
Utada Hikaru - Colors.mp3
Utada Hikaru - Distance.mp3
Vanessa Carlton - A Thousand Miles.mp3
Vo Vo Tau - 裸~nude~.mp3
Whitney Houston - I Will Always Love You.mp3
Will Young - Evergreen.mp3
Will Young - Your Game.mp3
Floor28 flyinspace Posted 2008-08-20 15:12
银牌会员 Posts 517 Credits 1,206
What about the error message after the file is moved? Please post the result.
Floor29 flyinspace Posted 2008-08-20 15:15
银牌会员 Posts 517 Credits 1,206
```batch
@echo off & setlocal EnableDelayedExpansion
set "Total=0"
for /f "delims=- tokens=1,* " %%i in (' dir /b *.mp3') do (
set /a "Total+=1"
echo 正在处理第!Total!首歌:[%%i-%%j]
if not exist "%%i" md "%%i"
if exist "%%i-%%j" (
copy "%%i-%%j" "%cd%\%%i"
) else (
echo [%%i-%%j]未处理>>Err.txt
)
if exist "%cd%\%%i\%%i-%%j" del "%%i-%%j"
)
echo 处理完毕,共处理[!Total!]首歌~!&pause>nul
start Err.txt
```

Please provide the content of the popped-up text file after the above code finishes running.
Floor30 iuiu Posted 2008-08-20 15:29
初级用户 Posts 15 Credits 32
Originally posted by flyinspace at 2008-8-20 03:15 PM:
@echo off & setlocal EnableDelayedExpansion
set "Total=0"
for /f "delims=- tokens=1,* " %%i in (' dir /b *.mp3') do (
set /a "Total+=1"
echo 正在处 ...


No Err.txt file was generated
Prev  1 2 3  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023