IMPORT v1.1 Short Text File Written by Michael MacDonald 01/01/91 rev 02/26/91 (see addendum for changes) IMPORT is a compiled Clipper PRG program. It is 'freeware'. No fee is expected or will be accepted.(Well, maybe that's going a little too far. Let's call it 'You Be the Judge Ware' By this I mean, it's free, do whatever you like with it. You're under no obligation, legally or morally to pay me anything for it. But, hey, I'm human. If you feel so inclined, I'm not going to tear up the check.) It's purpose is to import a list of files into RoboComm's UPLOADS.DBF (the database that keeps track of downloaded files on the BBS's you call). It works exactly the same as the Import function in the NEWFILES database. However it should be run from the DOS prompt and not from within RoboComm. When you type 'import' from the DOS command line, the program will prompt you first for a filename, and then for a BBS ID. At the filename prompt type the complete path and filename of the text file you want to IMPORT. At the BBS ID prompt, type the name you want displayed under the 'Downloaded From' field. Next IMPORT will ask you if the files are 'Offline?'. Answering yes to this will cause another prompt to appear asking for the location of the files. This information is displayed by Robo when viewing the downloads directory. Pressing anything but 'y' at the 'Offline' prompt will cause the 'OFFLINE' and 'LOCATION' displays to be blank. The 'LOCATION' box is where Robo puts the volume name of the floppy when you move a downloaded file offline. If the 'OFFLINE' field is blank, Robo assumes the file is in your downloads directory. I would recommend marking all files 'Offline', unless they reside in your Downloads directory. The Location field is optional. IMPORT will put the system date in the date field, and the filename, length, BBS date, and description will be supplied by the text file. If files are marked as offline, you can have Robo move them to your uploads directory, if you wish. The text file that IMPORT reads from must be in standard PCBoard format. Here is an example of that: PCB145UM.ZIP 26354 12-01-90 User manual for PCBoard 14.5. This is a great help to those users new to PCBoard. Uploaded by: Jim Rooney ÀÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÙ ÀÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 1-12 15-21 24-31 34-78 filename length filedate file description Notice that there are two spaces between each field, the length has room for seven digits and is right justified, and the description can be on more than one line. IMPORT has no limit to the number of lines of description it will read, but RoboComm version 2.x will only display five. Future versions will probably display more than that, and IMPORT should work fine with them. I realize that some BBS's have their file lists in non-PCBoard standard formats. For those lists, you'll have to reformat them, just as you would to 'Import' them into the NEWFILES database. Some lists also have the pipe '|' character marking the beginning of each line of the 'extended' description. IMPORT will handle those fine, there is no need to remove them. IMPORT.EXE can reside anywhere, but you AND the file IMPORT.DBF must be in the directory where you keep your RoboComm files when you invoke it. IMPORT.DBF is a 258 byte empty database. It contains just the structure when you first invoke IMPORT and when you're done. IMPORT uses it as a temporary place to put the data, and removes it as soon as it is put in UPLOADS.DBF. It primary purpose is to 'eat' up the spaces between the fields, and more importantly, to determine if a file has more than one line of description. IMPORT won't work without it, so don't lose it. The source code has been included for any Clipper users that wish to play with it. ADDENDUM: The initial release of IMPORT would not import the last record in the file. So if you tried to import one file, you got nothing. This has been fixed. There was a problem with the 'percent done' counter under certain circumstances. It usually surfaced on small files. This now works properly. If your text file didn't have an extension on it's name, IMPORT would accept it as a valid filename, (naturally) but could not open it. Unless you added a period (FILE. for FILE) nothing would get added to the database. This is more a problem with Clipper than with my code. I added a routine to see if the filename contained a period, and if not added one so Clipper wouldn't choke on it. The most important change in the program is the addition of some code to bypass extraneous text. If the text file you are importing from has text in it other than filenames, IMPORT will now bypass it. This means, for instance, if you had your Robo log set to verbose, and did a scan for newfiles, you could run IMPORT directly on ROBOCOMM.LOG and it would pick out the list of filenames. I realize you probably wouldn't want to do that, but I gave the example to show what is possible. It uses several criteria to determine if a line of text is a filename or not. It must have a period somewhere in the first 12 characters. The characters that occupy the file length field must be numbers, and the date field must have dashes in exactly the right place, ie (xx-xx-xx). If all these are true, then IMPORT assumes it is a valid filename and imports it. The chances of something slipping through this are pretty slim. 1/6/91 Added the Offline and Location prompts. If you answer YES to the OFFLINE? prompt, IMPORT will prompt you for a location. What you input here will be put in those fields. IE, under status you will see 'Offline', and under location you will see whatever you typed in. If you answer NO to the OFFLINE? prompt, it and the location field will be blank. If you find any little bugs, drop me a line on one of the Robocomm conferences on GROUPONE BBS, or any of the PCBoard 'netmail' networks. Meantime, enjoy. Ver 1.1 With the advent of Robocomm ver 3.0, which has an Import function built into it's Downloads directory, this program has become more or less obsolete. It will still operate, however, with one exception. Only the first line of the file description will appear when you view the file list. This is due to a new method of handling the extended description in ver 3.x. IMPORT will detect which version of Robo you're running and use the correct DBF. Michael MacDonald 15509 183rd Place NE Woodinville, WA 98072