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
----- Original Message -----
Sent: Saturday, June 25, 2005 7:34 PM
Subject: [RBG7-L] - Locating files in a directory

I know that you can use choose to select files from a directory.  I have been trying to develop a system to automatically copy the file to another directory
We have developed a program for automating classical music programming and each each in the directory is mark as follows:
 
0000080 Bach Concerto No. 6 for Harpischord, 2 Recorders, Strings, and Continuo in  F Major, BWV 1057.MP3
 
In the data base we store the cd id as 000080 and right now I have set up a table with the file names from the directory.  What I currently do is to put quotes
'0000080 Bach Concerto No. 6 for Harpischord, 2 Recorders, Strings, and Continuo in  F Major, BWV 1057.MP3' around the title and use the copy command to transfer it to the receiveing directory. However, the program will sometimes select it but most of the time it will not. The copy command will not accept * in the transferring file name so I can not use this method.
Is the a command similiar to the choose command that does not require me to manually select the file?
Appreciate any suggestions.
Chuck Conrad
 
Supporting the Arts in Indonesia
Conrad, Charles Dean
President Commissioner
PT KarCon Indonesia
Jl. Pondok Betung Raya
Jakarta 15221
Indonesia
[EMAIL PROTECTED]
tel:
fax:
mobile:
+62 21 7388-2068
+62 21 7388-2068
+62 81 189-7086
Add me to your address book... Want a signature like this?
 

Reply via email to