|
My objective is to copy a mp3 file from the c:\Musc\CDs
directory to E:\ 28June2005\Morning directory. The file gets renamed
in the process for example 08-000080.mp3 from the original 0000080 Bach Concerto No. 6 for
Harpischord, 2 Recorders, Strings, and Continuo in F Major, BWV
1057.MP3.
I have copy text files to a
table in my database which is exactly the same as the directory infornation.
However, the program will not always select the file for
transfer.
Below is the code I am
using.
SET VAR vdate1 =
(getdate('Select Date'))
CHOOSE vwant FROM #LIST '1MP,2EP' AT CENTER,CENTER,TITLE 'Program Selection' SET VAR vloc1 = ('E:\CNJ\') IF vwant = '1MP' THEN SET VAR vloc3 = '\Morning\' ELSE SET VAR vloc3 = '\Evening\' ENDIF DIALOG 'Enter Directory for Program (XX Month YYYY)' vloc2=20 v1 1 AT CENTER,CENTER SET VAR vloc = (.vloc1+.vloc2+.vloc3) WHENEVER NOT FOUND GOTO errors DROP CURSOR cur1 DECLARE cur1 CURSOR FOR SELECT selno, cntrl FROM music WHERE program = .vwant + AND playdate1 = .vdate1 AND selno EXISTS AND CNTRL EXISTS ORDER BY selno OPEN cur1 FETCH cur1 INTO vsel INDV1, vcnt WHILE SQLCODE = 0 THEN iF vsel < 10 THEN IF SELNO < 6 THEN GOTO ENDSECT ENDIF SET VAR vseltext = ('0'+(CTXT(.vsel)) + '-') ELSE SET VAR vseltext = ((CTXT(.vsel)) +'-') ENDIF SET VAR vnum TEXT = (CTXT(.vcnt)) SELECT FILEname1 INTO VFILENAME FROM FILINFO WHERE FILENAME1 CONT .VCNT set quotes =" set var voldname = ("'"+.vfilename+"'") set quotes = ' SET VAR VNEWNAME = (SGET(.VFILENAME,7,1)) set var vnewname1 = (.vseltext + .vnewname + '.mp3') SET VAR vloc4 = (.vloc + .vnewname1) cd cds COPY &voldname &vloc4 cd .. LABEL ENDSECT FETCH cur1 INTO vsel INDV1,vcnt ENDWHILE Appreciate your
input.
Chuck From: Bernard Lis [mailto:[EMAIL PROTECTED] Sent: Sunday, 26 June, 2005 06:58 To: RBG7-L Mailing List Subject: [RBG7-L] - Re: Locating files in a directory Chuck,
I'm not exactly clear about your final goal but,
you could
after selecting the id (000080), unload the data
into an ascii file
copy the file to the receiving directory and then
.........
Here I am lost! do you want to input it into
another database or what will you do with it after copying it?
Bernie Lis
| |||||||||||||||||||
- [RBG7-L] - Re: Locating files in a directory Bernard Lis
- [RBG7-L] - Re: Locating files in a directory cdconrad
- [RBG7-L] - Re: Locating files in a directory Sami Aaron
- [RBG7-L] - Re: Locating files in a directory David M. Blocker
- [RBG7-L] - Re: Locating files in a directory Alastair Burr
- [RBG7-L] - Re: Locating files in a directory David M. Blocker
- [RBG7-L] - Re: Locating files in a directory Bernard Lis
- [RBG7-L] - Re: Locating files in a directory Alastair Burr
- [RBG7-L] - Re: Locating files in a directory Sami Aaron
- [RBG7-L] - Re: Locating files in a directory David M. Blocker
- [RBG7-L] - Re: Locating files in a directory James Bentley
- [RBG7-L] - Re: Locating files in a directory cdconrad
