News:

Current Full E-Touch Version: 10.2.0
Current Demo E-Touch Version: 10.0.0
Current Beta: 10.2.1 Beta 22 (09/02/23)

Main Menu

E-Touch Download Song or Album Tutorial

Started by fordman, February 26, 2010, 06:54:59 PM

Previous topic - Next topic

fordman

E-Touch 'Download Song' or 'Download Album' Tutorial

First off, I'd like to thank E-Touch user Hitbig for his help as he has done most of the leg work for the song download.

One of the many fine features with E-Touch is the ability to download a song from your jukebox to your MP3 player (or USB

stick)! We are going to copy the songs to your portable device by means of a 'batch file'.

Lets see how this is done.

Step 1

Open up your E-Touch folder: usually c:\Program Files\E-Touch Jukebox

In that folder, create a 'Download' folder.



In this folder we will create a 'Download.bat' file.

Open up notepad, and copy the line below:

call "C:\program files\E-touch Jukebox\download_B.bat"

Save the file as 'Download.bat'

To save it as a .bat rather than a .txt file, use the drop down (arrow 1)
Change the extention to .bat (arrow 2)
Then save it (arrow 3)



Make sure that it is saved in the c:\Program Files\E-Touch Jukebox\Download folder.

Step 2

We will need to make a couple of other .bat files.

In the c:\Program Files\E-Touch Jukebox folder we will create 2 more batch files.

Again, open notepad and copy the lines below:

@echo off
erase "C:\program files\e-touch jukebox\download\download.bat"
xcopy /Y "C:\program files\e-touch jukebox\download\*.*" /S /E "YourDrive:\"
pushd C:\program files\e-touch jukebox\
del /q download /S
rd /q download /S
md Download
copy "Download_C.bat" "C:\program files\e-touch jukebox\download\Download.bat"

Now save the file the same way you saved the first .bat file but name it Download_B but make sure it is save in the
C:\program files\e-touch jukebox folder.

Once it is saved we need to tweak it a bit for your set up.

In the line below, you will see "YourDrive".

xcopy /Y "C:\program files\e-touch jukebox\download\*.*" /S /E "YourDrive:\"

This needs to be ammended to a drive letter that is assigned by Windows when you plug in your portable device. Usually, it

will be the same drive letter each time you plug a portable device into the jukebox. In this tutorial, the line will look

like this:

xcopy /Y "C:\program files\e-touch jukebox\download\*.*" /S /E "E:\"

This is where 'E' is the drive letter assigned by windows on my jukebox.

After you tweak the drive letter to suit your setup, save the file as 'Download_B.bat'

Step 3

We need to make another batch file.

Open notepad again and copy the line below:

call "C:\program files\E-touch Jukebox\download_B.bat"

Save it as 'Download_C.bat' in the C:\program files\e-touch jukebox folder as well.

Now you should be able to transfer your tunes from your Jukebox to your MP3 or other portable device!


Oh, but wait, "what if I what to choose the drive to transfer the song other than the drive I have as the default?"

This will be in a separate Tutorial


Hope this helps!  :beer

Fordman










wwwombat

#1
I'm struggling a little with this topic.

I'm using Windows 7 so I'm sure that's the culprit. I am also running E-Touch in Administrator mode (but I've tried not as well)

If I create the DOWNLOAD folder and place the files in their respective places then the first copy works okay.

However the MD (Make directory) command, whilst (re)creating the directory doesn't allow me to access it via windows explorer (I get the message "C\Progam Files (x86)\E-Touch Jukebox\DOWNLOAD is not accessible. Access is denied." and it appears therefore that the copy of Download_C.bat back into this directory doesn't occur.

"Magically" (after the next queued song begins playing it seems) the DOWNLOAD directory eventually seems to disappear so I can recreate it manually.

If I don't create it manually then the DOWNLOAD directory WILL get created the next time I hit the DOWNLOAD button but, of course, there's no download.bat file in there to drive the immediate copy.

So... who's running this on a Windows 7 system and can tell me what I'm doing wrong? Should I not be placing download.bat in the DOWNLOAD directory and, instead, only trying to trigger this on exit of E-Jukebox?


ecbrad

I haven't used this feature but I do know from experience that E-Touch locks a file (song whilst it is use such as playing. I was doing some stuff on the weekend in cleaning up files and re-confirmed this. I'm sure Barry could articulate it better but from memory whenever E-touch plays a song it not only plays it but also need to write it to the history database and maybe other areas. Once the song is finished playing and has finished updating files etc the song then becomes available to windows Explorer again. Note I was doing this on my main PC (Windows 7 64 bit) but this also used to happen on my XP machine.

So maybe??? it's not releasing directory permissions until the next step just like queued songs in my scenario above?

brad

fordman

#3
Im not an expert on batch files, but I have read multiple times that Win7 (any flavor) has had several batch file command parameters removed. I use this on my Laptop that has Win7 Premium Home Edition and it works fine.

Fordman

here is the exact batch file that works for me:

@echo off
erase "C:\program files (x86)\e-touch jukeboxtest\DOWNLOAD\download.bat"
xcopy /Y "C:\program files (x86)\e-touch jukeboxtest\DOWNLOAD\*.mp3*" /S /E "E:\"
pushd C:\program files (x86)\e-touch jukeboxtest\
del /q download /S
copy "download_c.bat" "C:\program files (x86)\e-touch jukeboxtest\DOWNLOAD\download.bat"

wwwombat

I can see how that would work, certainly for single tracks but... correct me if I'm wrong... by removing the rd /q download /S command (and subsequent md) you'll leave in the DOWNLOAD folder the empty folders if you have previously downloaded an album instead of a single track.

Thus, the next time you select any form of download, this now empty subdirectory in the DOWNLOAD folder would be recopied to your USB stick (which, if you've swapped sticks or deleted the original directory off your USB stick would be annoying)

Hitbig

#5
No. RD means remove all including subdirectories. Then MD creates a new DOWNLOAD subd w/o
any subsequent structure. So future downloaded single tracks or albums will not contain
past  downloaded (empty or not) subdirectories.

Anyways, this download feature was working very nice in XP.
I'll test again but in WIN7, just curios.

wwwombat

But that's what I'm saying...you NEED the RD/MD pairing to remove the subdirectories.... but if you include them, the locking feature of either Windows 7 or E-Touch prevents the MD/(re)copy of download.bat from occurring.

So I need either someway to kill the subdirectories under Windows 7 without removing the actual DOWNLOAD directory -OR- I need someway for E-Touch to allow the MD/copy to proceed after the erase has been performed.

Hitbig

#7
W7 users (work for XP too):
If you are experiencing some problems use this :

Just replace the commands in Download_B.bat from Fordman tutorial. The rest is the same.

Download_B.bat
@echo off
erase "C:\program files\e-touch jukebox 6\download\download.bat"
xcopy /Y "C:\program files\e-touch jukebox 6\download\*.*" /S /E "YourDrive:\"
pushd C:\program files\e-touch Jukebox 6\Download
@echo off
pushd %1
del /q *.*
for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
popd
pushd C:\program files\e-touch jukebox 6\
copy "Download_C.bat" "C:\program files\e-touch jukebox 6\download\Download.bat"

Wwwombat :
What this does is :
1)Copy all from Folder Download to "Your Drive".
2)Remove files and subfolders from Download without deleting the root folder  (which is Download).
3)Copy back to Download folder the bat file Download.bat

wwwombat

Ah... I see what you're doing... recursively deleting any subdirectories within DOWNLOAD instead of erasing DOWNLOAD itself.

Yep..that'll work (and does)

Just one minor (somewhat unrelated) quibble then... if downloading a song with an ampersand (&) in it, then a file comes out okay... but If I download an album (in this case Neneh Cherry for both Album Artist and Album name... since I collate my own "Greatest Hits" album for each artist) and a track artist in the directory happens to have an  & in it (in this case 7 Seconds by Neneh Cherry & Youssou N'Dour but anything by Bill Haley & His Comets or Nick Cave & The Bad Seeds also applies)  then the directory name ends up being Neneh Cherry && Youssou N'Dour - Neneh Cherry (or, in the Bill Haley case - Bill Haley && His Comets - Bill Haley & His Comets... only on one side not both.)

In fact I'm not sure why my directories and songs are being renamed at all (or whether I can direct the naming standard)... in the original my directories are simply the artist name (Neneh Cherry) and the songs are structured track title_track artist (i.e. 7 Seconds_Neneh Cherry & Youssou N'Dour) so they are sorted alphabetically when displayed within E-Touch.

But, as I say, this is unrelated to the original download issue which I consider solved. Thanks all.

Hitbig

#9
When you say recursively I don't know what you mean,  I just did research in the net,
copy and paste, tested and since it worked, I was happy. At least we sorted this out, because w7
makes me have oftenly hard times.

On the other hand maybe you could explain your naming confusion to Barry in the related
Support Section. I'm sure (as you know) than he could give a good answer or maybe
change the way the Artist-Album folder from download function is being created. :beer

LLUncoolJ

I tried to set this up, but instead of copying the files to my USB drive, it is copying them into E-Touch Jukebox 8/Download. I'm not sure if something has changed in version 8 or if I am missing something.

Barcrest

Quote from: LLUncoolJ on July 19, 2012, 03:30:32 AM
I tried to set this up, but instead of copying the files to my USB drive, it is copying them into E-Touch Jukebox 8/Download. I'm not sure if something has changed in version 8 or if I am missing something.

Did you set up the bat files as detailed by fordman at the start of this thred?
Keep on Rocking in the Free World \m/ ;D\m/



Jukebox Stats...

LLUncoolJ

Yep, have done it 3 times now. Originally, I was using it exactly as written. Then it occured to me that I have 2 drives, and ET is installed on the F: drive, along with all of the music files (C: is only windows, all others are on F:). So I changed all of the C: to F:, but same results. It is placing the downloaded files in F:->E-Touch Jukebox 8->Download instead of on the USB flash drive.

fordman

When you plug your flash drive into your usb port, what drive letter gets assigned? Windows assigns different devices different letters. Your flash drive might get assigned G while an MP3 player may get H.

Turn E-Touch off, see what letter is assigned to the flash drive, change the bat file to letter assigned. Downloading to the E-Touch 8/Download folder is where it should go from the program. The bat file sends it to the flash drive, then deletes the files once copied to the flash drive (which you said the files still remain in the E-Touch 8/Download folder tells me your bat file isnt deleting the files as well).

Fordman

LLUncoolJ

Fordman,
Are we talking about Download_B?  Here is what I currently have saved as Download_B.bat (Hard drive is F: , USB is G:)

@echo off
erase "F:\program files\e-touch jukebox\download\download.bat"
xcopy /Y "F:\program files\e-touch jukebox\download\*.*" /S /E "G:\"
pushd F:\program files\e-touch jukebox\
del /q download /S
rd /q download /S
md Download
copy "Download_C.bat" "F:\program files\e-touch jukebox\download\Download.bat"

Download.bat and Download_C.bat are saved as you have them written above except c: is replaced with F:.