Solved Help Needed with Searching File/Folder/Move .Bat file

Gunslinger2

New member
Local time
11:03 AM
Messages
25
I've been searching the last 2 hours on a solution to my problem & have yet to find an answer so I thought I would post it here.

Description of Problem:

I have a folder dedicated for songs (guitar tabs & chords) that are .htm extensions, however I would like to move these songs to the/an appropriate Artist folder.

For Example: (current DIR layout)
Folder \ songtitlewithnospaces.htm

Ideal DIR layout
Artist Folder \ songtitlewithnospaces.htm

I have a listing or can create a listing (.txt file) of the songs by the artist, I need a way to search this .txt file for the song name (with no spaces i.e. songwithnospaces.htm) and move the file to the corresponding artist folder.

I would like to create a .bat file for this as I have 1000+ songs and to search/find & move each song file to the correct artist folder would take more time than I have.

Any help would be appreciated, thanks.
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF

My Computer

Computer Manufacturer/Model Number
HCL
OS
Winbdows 7 ultimate x64 | Ubuntu 12.04 x64 LTS
CPU
Core 2 Duo e7400 @ 2.90GHz
Motherboard
Gigabyte G31M-ES2L
Memory
3GB DDR2
Graphics Card(s)
Asus Nvidia GTX 560Ti 1GB
Sound Card
On-board
Monitor(s) Displays
HCL eZeeBee 18.5" LCD
Screen Resolution
1366x768 @ 60Hz
Hard Drives
Western Digital 320GB
PSU
Corsair CX500 V2 500W
Cooling
Stock
Keyboard
Stock
Mouse
Stock
Internet Speed
15-25kBps D/L | 10kBps U/L | Hey Don't laugh
It's not my media collection that is messed up, well it is somewhat but I've used media monkey in the past and it's ended up making things worse.

No this is a collection of song chords & tabs (to teach you how to play the song on guitar) and all the files are in .htm or .html format.
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
Could you upload a text file in the format of,

Artist Name 1
songwithnospaces1.htm
songwithnospaces2.htm

Artist Name 2
songwithnospaces3.htm
songwithnospaces4.htm

etc....

Then I could easily create a batch file like,

xcopy /qv songwithnospaces1.htm .\"Artist Name 1"
xcopy /qv songwithnospaces2.htm .\"Artist Name 1"
xcopy /qv songwithnospaces3.htm .\"Artist Name 2"
xcopy /qv songwithnospaces4.htm .\"Artist Name 2"

If that looks right to you.
 

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
Currently still searching for an answer but yes attached are two artist documents with their songs.

The format of the .txt files isn't exactly like you want as I think I'm on to something along the lines of what I need.

Using 2 files (Alabama.txt) with Filelist.txt (Dir /b > filelist.txt, from .bat file)

Current .bat file:
Code:
@ECHO OFF
:: Get Files In The Directory & Output Them Into Filelist.txt
Dir /b > filelist.txt 
::
Dir /b|find "string" (C:\Artist\Alabama.txt)
for %%a in (E:\0BACKUP ONLY\DOCS\song lyrics) do move (C:\Artist\)
pause

there are no spaces in the file name of the html files is why the songs are they way they are.
 

Attachments

Last edited:

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
No attachments, did you click upload after browsing and selecting the files?
Edit: Files there now

Does each Artist have their own text file with a list of their files?
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
no I'm having to manually create that list & ill be creating the list all the same way
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
filelist.txt is no good there's no way to determine which file belongs to which artist, except some that have the artist in the title.
The other two I can work with or creating a list in one file in the format I specified before.
 

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
that's why I was using 2 files i.e. Alabama.txt to get the songs by them and searching the Filelist.txt for the songs and then moving the .html files to the corresponding artist directory. Just trying to automate the process as much as I can as I have to make each artist song list manually.

I figure that I'll have to end up making a .bat file for each artist which is fine but I'm unfamiliar with all of the .bat file functions.
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
Make a backup of the files if you havn't already. Now this isn't perfect but if you can create a list for each artist then this should work
Code:
@echo off

rem Copy Files
for /F "usebackq delims==" %%i in ("D:\Artist\Alabama.txt") do xcopy /qv "%%ilyricschords.*" ".\Alabama\*.*"
for /F "usebackq delims==" %%i in ("D:\Artist\BillAnderson.txt") do xcopy /qv "%%ilyricschords.*" ".\BillAnderson\*.*"

rem Move Files - requires destination folder to already exist
md Alabama
md BillAnderson
for /F "usebackq delims==" %%i in ("D:\Artist\Alabama.txt") do move "%~dp0%%ilyricschords.html" "%~dp0Alabama\"
for /F "usebackq delims==" %%i in ("D:\Artist\BillAnderson.txt") do move "%~dp0%%ilyricschords.html" "%~dp0BillAnderson\"

echo.
pause
Just put it in the same folder as the files.

Only use the 2 copy lines or 2 move lines not all 4. I would use the copy lines as there will be less scripting then if all is successful then you can delete the originals.

Take note the two text files did not contain the extension .html on the file names if any list does then remove .* from "%%ilyricschords.*" for the copy lines or remove .html "%~dp0%%ilyricschords.html" for the move lines.

I can't see anyway of doing this any easier than manually creating the list files. Using a single list file in the format I specified before would take just as long to create but using find and replace in a good text editor could speed up the batch file creation.

EDIT: Just looked at your filelist.txt again and noticed all files contain "lyricschords" on the end so I updated the code to work with that.

EDIT: New and improved code in next post.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
New and improved code.
If your text files are named as the artist and the way you want the subfolder to read then use this
Code:
@echo off

for /f "tokens=1,2 delims=." %%i in ('dir /b C:\Artist\*.txt') do (call :COPY_FILES "C:\Artist\%%i.%%j" ".\%%i\*.*")

exit

:COPY_FILES
for /F "usebackq delims==" %%G in (%1) do xcopy /qv "%%Glyricschords.*" %2
No need to create a line for each artist it uses the text files name as the artist name.
I've only given code to copy the files to subfolders because it's easier than the move command.

BTW the text files should be located in C:\Artist and again run this from the folder containing the files to copy. This is based on your list formatted as

fortyhourweek
hatsoff
hangingupmytravelingshoes

if they are like

fortyhourweeklyricschords.html
hatsofflyricschords.html
hangingupmytravelingshoeslyricschords.html

then replace "%%Glyricschords.*" with "%%G"
with this code all list will need to be in the same format.
 

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
using this:
Code:
@echo off

for /f "tokens=1,2 delims=." %%i in ('dir /b C:\Artist\*.txt') do (call :COPY_FILES "C:\Artist\%%i.%%j" ".\%%i\*.*")

exit

:COPY_FILES
for /F "usebackq delims==" %%G in (%1) do xcopy /qv "%%Glyricschords.*" %2

as it is much faster but is there a way to delete the original file so that only the copy located within the artist folder exist?
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
I could see why that would be handy. Just change the last line to this

for /F "usebackq delims==" %%G in (%1) do xcopy /qv "%%Glyricschords.*" %2 && del /q /f "%%Glyricschords.*"

bit of info on &&
Use to run the command following && only if the command preceding the symbol is successful. Cmd.exe runs the first command, and then runs the second command only if the first command completed successfully.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
ok, the above code is working flawlessly for the most part for which I am grateful, however I've hit a snag.

Originally I had 3 txt documents titled: GospelCountry, LatestAdditions & Bluegrass
I've copied all the songs into one document called 0Songs2Organize.txt.

This file has 1535 songs.....

As it stands I have 103 Artist .txt files (i.e. Alabama etc. etc.)

I need a simpler/faster way to go through 0Songs2Organize.txt, get the artist name & song because as of this moment I'm having to sit and read/search for the artist, song, copy & paste to the corresponding Artist.txt file then remove the "By "Artist"", turn everything to lowercase and remove all the spacing....manually (d). Using Notepad++ makes some of this easier but heh...not enough..

I've also tried grouping the songs by artist in the 0Songs2Organize.txt and then copying & pasting to the appropriate Artist.txt but again it's time consuming to cut 'n paste scrolling up and down 1500+ lines grouping by artist :banghead:

Is there any way to ...for the lack of a better term "parse" the 0Songs2Organize.txt file so that it groups by the artist then I could just copy & paste to the correct Artist.txt file?

Any solution would probably be a better one than the way I'm currently having to do this so any feedback or help is appreciated.

-Note-
Uploaded 0Songs2Organize.txt & artist.zip (contains all current artist.txt files created) for examples.
 

Attachments

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
Sorry for the late reply but it took a little to get something I think will work, well it's the best I can come up with anyway. It's still a hassle and also a 2 stage approach.

Create a folder and put the 0Songs2Organize.txt and the FindReplace.vbs script in it. A sample batch file and the VBScript are attached.

VBScript came from - VBScript Search and Replace

Create a batch file with the following code or start with my sample.
Code:
set STRING=
findstr /i /c:"%STRING%" ".\0Songs2Organize.txt"> ".\Artist\### %STRING%.txt"
findstr /i /v /c:"%STRING%" ".\0Songs2Organize.txt"> 0Songs2Organize1.txt
del ".\0Songs2Organize.txt"
ren ".\0Songs2Organize1.txt" "0Songs2Organize.txt"
cscript FindReplace.vbs ".\Artist\### %STRING%.txt" "%STRING%" ""
cscript FindReplace.vbs ".\Artist\### %STRING%.txt" " " ""
Now to use this you need to open 0Songs2Organize.txt and copy "by Artist Name" or "Artist Name" for the ones that don't have "by" in front and paste to the batch file so it looks like, set STRING=by Artist Name

If the "by Artist Name" has the "&" char in it, like "by carl & pearl butler" then it will need to be put in as, STRING=by carl ^& pearl butler.

You can do several at a time. Each time the batch runs it will remove the line from 0Songs2Organize.txt to make it easier to do the ones you havn't already done.

Don't worry about the Artist.txt filename yet we'll get to that just see how you go with this for now.

To be continued...

I'm having to sit and read/search for the artist, song, copy & paste to the corresponding Artist.txt file then remove the "By "Artist"", turn everything to lowercase and remove all the spacing....manually
Here I'm not sure about "turn everything to lowercase".
Are you talking about the text inside the Artist.txt file or do you mean Uppercase each name in the Artist.txt filename?

For the former I think were fine because DOS ignores cases with most things or use a switch to ignore also I couldn't see any uppercase in 0Songs2Organize.txt anyway and for the latter we'll get to that when we continue.
 

Attachments

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
Update, spent majority of last night/this morning separating, organizing artist with songs via spreadsheet.

Currently have a folder C:\Artist\*.txt - * = Artist that contains all the artist.txt files (used .bat file)
Code:
@echo off
for /f "tokens=1,2 delims=." %%i in (C:\songtools\Artist.txt) do (echo %%i >> %%~ni.txt)
pause

......[Long period of thinking goes by]:confused:

I was going to say something but I'm going to semi start over here, after a few days of grinding away at this (sometimes with little to no sleep) I have files everywhere & I need to get a little organized with what I'm doing because I'm starting to confuse myself & lose track of what I'm doing.

Will update in a few hours....
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
9 hours now on and off I've been working on organizing a Google Doc spreadsheet containing all relevant info to this project.

[URL Removed]

....and still editing it. Should be easier to come up with a game plan to create a .bat file or script to organize everything with all the information in one place.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
Marking as [SOLVED]

Appreciate all the help Duzzy but the long hours attempting this and the Google Spreadsheet having a major malfunction and becoming FUBAR was the straw the broke the camel's back.
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Ultimate x64
CPU
AMD Athlon II X3 425 Rana 2.7GHz Socket AM3 95W Triple-Core
Motherboard
ASUS M4A77TD AM3 AMD 770 ATX AMD Motherboard
Memory
G. Skil Ripjaw F3-12800CL9D-4GBRL x2 8GB total
Graphics Card(s)
XFX Radeon HD 6770 850M 1GB DDR5 DP HDMI DUAL DVI PCI-E
Sound Card
Onboard + Creative X-Fi Soundblaster X-treme Gamer
Monitor(s) Displays
20in LG + 19in Acer + 19in Dynex TV
Screen Resolution
Varies (unknown)
Hard Drives
500GB Seagate SATA
320GB Western Digital SATA
320GB Western Digital SATA
PSU
700W Power Supply - CorsairGS 700
Case
APEVIA X-Alien ATXA7AW-BL/420 Blue Aluminum Server Case
Cooling
x6 80mm Fans
Other Info
Case - http://goo.gl/Sp6VK
Mobo - http://goo.gl/NgiK2
CPU -http://goo.gl/wbp9R
RAM - http://goo.gl/x6tJ
GC - http://goo.gl/qrBab (ZNFC Model)
PSU - http://goo.gl/m4NFF
Ok. If you get into it again at a later date just continue this thread if you would like more help.

If you want to organize artist with songs via spreadsheet I recommend downloading OpenOffice and save regularly creating a backup each time you save so you always have a 2nd copy if the 1st gets corrupted.

OpenOffice spreadsheet app is called Calc.
 

My Computer

Computer Manufacturer/Model Number
Self built
OS
Windows 7 Ultimate x64
CPU
Intel Pentium Dual Core E5200 2.5GHz (3.77GHz OC)
Motherboard
Asus P5Q-E
Memory
Corsair 4GB DDR2 (4x1GB CM2X1024-6400C4)
Graphics Card(s)
Palit GeForce GTS 250 (1024MB)
Sound Card
On Board (ADI AD2000B 8ch HD)
Monitor(s) Displays
Samsung 32in LCD TV
Screen Resolution
1360x768
Hard Drives
2 x 1TB Samsung 103SJ (Raid0)
2 x External 500GB Samsung 502IJ (NexStar 3 HD Enclosures)
PSU
550W Antec Neo HE 550
Case
Antec P180
Cooling
Xigmatex Red Scorpion CPU Cooler. 3x120mm Fans
Keyboard
Logitech MX5000 Laser (Combo)
Mouse
Logitech MX5000 Laser (Combo)
Internet Speed
ADSL2+ (avg 10 Mbps Down, 0.80 Mbps up)
Other Info
Gigabyte GN-WP01GS 54g Wireless Lan Card
Back
Top