[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1063.0. "Extract *many* documents to VMS files?" by GALINA::SSMITH (PC?? I want a laptop VAXstation!) Thu Jul 16 1992 18:01

Hi.  I have a bunch of documents (about 200) in a folder that I'd like to
extract to (a) VMS file(s).  Either a single file with the messages in
*chronological* order, or individual files with the filespec incorporating
the message date/document number/something.

Does anybody have a simple piece of code (script, command proc, UDP) that
could do this?

Thanks in advance
T.RTitleUserPersonal
Name
DateLines
1063.1Sort of like this?BUFFER::VICKERSand thanks for all the fishFri Jul 17 1992 02:0219
    The script below will copy all of the documents in the currently
    selected folder to files of the form OAUSER:ZZTOP_NBSDATE_DOCNUM.TXT:
    
    ! Dump_Folder.SCP               This UDP dumps the entire folder to files
    !
            .FUNCTION FOR CAB$ WITH .FOLDER EQS OA$CURDOC_FOLDER DO -
             GET #DOCID = .FOLDER:30 .DOCNUM:6 \\ -
             DATE_CONVERT #DATE, OA$CURDOC_MODIFIED, 7\\ -
             GET #FILE = "OAUSER:ZZTOP_" #DATE:12 "_" .DOCNUM ".TXT" \\ -
             COPY "@#DOCID" #FILE
    !
    !
    ! [End]
    
    I am sure that you can adjust the file naming and directory to suit
    yourself.
    
    Have fun,
    don
1063.2Maybe this will do ...COPCLU::COPSPD::GLARGAARDAllan Glargaard, DS @DMOFri Jul 17 1992 11:0337
  Hi SSMITH :-)

  I wrote two scripts a while ago which will do what you want.

  They can be found at COPSPD:: (for a while) and are called
  FILE_FOLDER.SCP and FILE_FOLDER_ATT.SCP.

  Copy the files to your [.A1] directory and start the procedure with
  <DO FILE_FOLDER (or define a function key to call it)

  The script will then ask:
     Angiv mappenavn der skal arkiveres: (Name of folder to copy to VMS:)
     Angiv omr�de hvor filer skal placeres: (VMS Directory specification:)
     Angiv fornavn til filerne, eks. A1V23_K506_: (File names:)

  Example:
  <DO FILE_FOLDER
  Angiv mappenavn der skal arkiveres: OUTBOX
  Angiv omr�de hvor filer skal placeres: [GLARGAARD.TEST]
  Angiv fornavn til filerne, eks. A1V23_K506_: TEST_
  Arkiverer dokumenter fra mappen "udbakke"
  Der er arkiveret 9 meddelelser og 1 bilag.
  (Nine messages with a total of one attachment archived)
  $DIR [GLARGAARD.TEST]
  Directory $1$DUA8:<GLARGAARD.TEST>

  TEST_101.TXT;1      TEST_102.TXT;1      TEST_103.TXT;1     TEST_104.TXT;1
  TEST_105.TXT;1      TEST_10500.TXT;1    TEST_106.TXT;1     TEST_107.TXT;1
  TEST_108.TXT;1      TEST_109.TXT;1

  So, a message is callde <what you specified>+<a counter (100,101,102...)>,
  eg. TEST_105.TXT, attachments have an additional counter, eg. TEST_10500.TXT

  Sorry about the I18N problem - I'm sure you can fix it yourself.

  Best regards,
  Allan