Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084186
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:24:28+00:00 2026-05-20T18:24:28+00:00

At application shutdown I want to send a file to a server via Internet

  • 0

At application shutdown I want to send a file to a server via Internet (with Indy). If data is sent ok, I want to delete that file from the computer. The critical part is that my file should NOT be stored in both places (server, local computer) at the same time.

For example, my application may unexpectedly stop AFTER it sent the file to the server and BEFORE it deleted the file from local disk. In this case the file will exist in both places.

The application may stop because of the following reasons: power failure, Control+Alt+Del, shutdown by OS, shutdown by user, system hang (maybe there are other reasons that I forgot?).

How can I guarantee that the file is stored in one single place?


I think we can consider that writing the file to disk is instantaneous since the file is very small.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:24:29+00:00Added an answer on May 20, 2026 at 6:24 pm

    This is how I (partially) solved my problem

     Delete the file from disk (keep copy in RAM);
     Send the file to server;
     if server receives file ok
     then DoNothing (file was already deleted)
     else Write file back to disk;
    

    The problem is that between step 1 and 2 the file exists nowhere. If the app dies at that point, the file is lost (however, this is a bit more acceptable than being in two places). Unfortunately the delay between step 1 and step 2 is HUGE since communication with the remote server is extremely slow (maybe even up to 1-2 seconds).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how do I delete an assembly file after application shutdown? This is not as
I want to make a Linux application that send a message to a remote
I have a Java application which I want to shutdown 'nicely' when the user
i am developing application which send and receive data between two computers but there
I'm working on a client/server application where the connections from the client to the
I have an application that runs on my computer and the computers of my
I want to process incoming mails coming from an exchange server and save it
Is there a way for a Java GUI application to respond to system shutdown
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
The application my team is currently developing has a DLL that is used to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.