[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: uploading source files with ftpapi



Sender: Scott Klement <klemscot@xxxxxxxxxxxx>


Hi,

If I'm planning to switch to the directory anyway, I generally do a
mkdir, ignore the error, then a chdir (but don't ignore the error on
the chdir)

Otherwise, you'd have to do a chdir, see if it worked, if not you'd have
to do a mkdir followed by an additional chdir, which is one extra step.
Is that a big deal?  No, but it's about the only difference between the
two methods :)



On Sat, 5 Oct 2002, Sean Porterfield wrote:
>
> Hello all!
>
> I want to upload many source members from a few source files in two
> libraries to a Linux box.
>
> I plan to end up with ~/LIBRARY/FILE/MEMBER.TYPE on the Linux box.
>
> I already have a list of members to upload from DSPFD *MBRLIST *OUTFILE
>
> What is the best way to ensure the directory structure on the Linux box?
> Be sure to set it up in advance?  Attempt to chdir, if it fails then
> mkdir?  (Since the Linux box is mine, we can presume that I have authority
> to mkdir.)  Attempt to mkdir and ignore failure that dir exists?  Other
> options?
>
> Right now, I know I have 2 libraries, 5 files per library, and many
> members per file.
>
> I may experiment with the different options.  Just looking for opinions on
> this.  (FYI, right now there appear to be 133 members in one library and
> 3321 members in the other.)
>
> If I can figure it out, I may include processing to determine if the
> member has been changed and needs to be uploaded.  (If I can set the
> date/time on the Linux box during the upload and compare that to the
> date/time in the *OUTFILE.)  The idea is really like rsync, I guess.
>
> Thanks in advance for any input.
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------