Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Hey, are you on my server?

    This is part of my FTP up loader...

    I need to check to see if there's anything in the "ftp" folder on my server, if there is, then a dialog comes up to say "sorry dude you can't upload yet".
    The folder MUST be empty to upload to it.

    Using the code below, how would I accomplish this?

    result = FTP.ListFiles();
    for i = 1, tbFiles.Count do
    local name = tbFiles[i].Name;
    err = Application.GetLastError();
    if err ~= FTP.OK then
    Dialog.Message("Error", _tblErrorMessages[err]);

  2. #2
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by Bruce View Post
    This is part of my FTP up loader...

    I need to check to see if there's anything in the "ftp" folder on my server, if there is, then a dialog comes up to say "sorry dude you can't upload yet".
    The folder MUST be empty to upload to it.

    Using the code below, how would I accomplish this?

    result = FTP.ListFiles()
    for i = 1, tbFiles.Count do
    local name = tbFiles[i].Name;
    err = Application.GetLastError();
    if err ~= FTP.OK then
    Dialog.Message("Error", _tblErrorMessages[err]);
    Dunno where you're defining tbFiles, but I'd use

    Code:
    if (FTP.ListFiles().Count == 0) then
           FTP.Upload("localfile.zip", "remotefile.zip", nil);
    end

Similar Threads

  1. Update server just won't go away
    By davedoc in forum TrueUpdate 3.5 Discussion
    Replies: 4
    Last Post: 08-21-2008, 12:59 PM
  2. downloading scripts from server - problem
    By EugenSlo in forum TrueUpdate 2.0
    Replies: 1
    Last Post: 01-29-2006, 04:35 PM
  3. Microsoft SQL Server 2005 Express Edition
    By linuxbox in forum Setup Factory 7.0
    Replies: 0
    Last Post: 12-25-2005, 07:55 PM
  4. Can the uif receive the active server?
    By kielty in forum TrueUpdate 1.0
    Replies: 0
    Last Post: 07-09-2004, 05:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts