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 8829057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:44:52+00:00 2026-06-14T07:44:52+00:00

Have pretty odd situation. There are 2 applications: 1) C:\MyFolder1\First.exe 2) C:\MyFolder2\Second.exe First.exe runs

  • 0

Have pretty odd situation. There are 2 applications:

1) C:\MyFolder1\First.exe

2) C:\MyFolder2\Second.exe

First.exe runs Second.exe and quits.

Process.Start(@"C:\MyFolder2\Second.exe");

// And exit.

Seconds.exe waits a few seconds and tries to remove “C:\MyFolder1\” folder.

// Wait for 5 seconds - First.exe terminated by that time for 100%

Directory.Delete(@"C:\MyFolder1\", true);

Action fails with “The process cannot access the file ‘C:\MyFolder1\’ because it is being used by another process.” It’s able to remove the First.exe file (actually all files in the folder), but not the folder itself.

Does anybody have an idea why the folder is locked by the second process?

  • 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-06-14T07:44:53+00:00Added an answer on June 14, 2026 at 7:44 am

    A process has a default working directory. You set its initial value with the ProcessStartInfo.WorkingDirectory. You cannot jerk that floor mat, it keeps a lock on that directory until the process terminates or it changes its working directory with Environment.CurrentDirectory. The default working directory for Second.exe is C:\MyFolder1 since you didn’t set it.

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

Sidebar

Related Questions

This is a pretty odd situation I have here. I have used a piece
That sounds pretty odd but i have this cod and i need to convert
I have a bit of an odd situation, and I'm struggling with populating a
I have the following function to style list elements: function styleRows() { $(.pretty-list li).removeClass(even-row).removeClass(odd-row);
I have two models, first one is dependent on the second one, and I
We have an odd problem, we are tranforming a pretty complicated XML file using
Apologies for making this my second Z80 DAA question - I have pretty much
I'm pretty new to WordPress but have spent some 50 odd hours studying up
There must be something I'm missing here. I have this nice, pretty Oracle SQL
I have pretty simple jquery code : $(document).ready(function(){ $('img.marqFl').on({ mouseenter: function() { $(this).animate({height: 300},

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.