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

  • Home
  • SEARCH
  • 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 8788475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:09:11+00:00 2026-06-13T22:09:11+00:00

I am having an issue with a panel i am working on, what I

  • 0

I am having an issue with a panel i am working on, what I am working on is whenever there is an upgrade from one version of the software to another the older start menu group on the windows machine still shows. I have tried to see if i can delete the old directory first and then make the new one but all that happens is the old one is still staying. Not really sure how to go about it all I need is just one directory in the start menu group to show weather I delete or rename the old.

Here is what I have so far to delete the old system variable. This is something I am working on and i know its not perfect but any help would be appreciated. If you need explanations I would be happy to comply. Thank you

 if ( PrioGlobals.UPGRADE ){
        oldm_txtGrpName.setText(PrioGlobals.StartMenuFolder);
    }

if ( PrioGlobals.UPGRADE ){   
           String oldShortCutPath = PrioGlobals.cre.getShorcutDirectory();
           String oldStartMenuGroupFolderPath = oldShortCutPath + File.separator + BrandStrings.WIN_FOLDER_NAME + 
        File.separator +oldm_txtGrpName.getText(); 

           File oldStartmenu = new File(oldStartMenuGroupFolderPath);
           if (oldStartmenu.exists())
           {
               oldStartmenu.delete();
           }
           else
               oldStartmenu.delete();
           }        
  • 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-13T22:09:13+00:00Added an answer on June 13, 2026 at 10:09 pm

    If I am reading your code correctly, oldStartmenu is a directory? In that case, oldStartmenu.delete() will probably fail because the directory is not empty (see File delete) In which case you need to delete the directory and all of it’s files recursively.

    At which point I would recommend including commons-io FileUtils and use one of the directory utilities such as forceDelete or deleteDirectory

    [update]

    Once you have added the commons-io library to your project you would

    // import FileUtils
    import org.apache.commons.io.FileUtils;
    
    // ...
    
    if (oldStartmenu.exists())
    {
        FileUtils.deleteDirectory(oldStartmenu);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of our customers is having any issue with the web panel software we
Having issue with slider navigation. Works perfectly fine when there are no other unordered
I having issue that content assistant / intellisense is working in methods such as
Hi guys I am having issue I have this query: SELECT * FROM useraccount
Having an issue with traversing in jQuery.. hopfully an easy one..but I'm banging my
I'm having an IE7 issue with a website i'm working on - www.mini-meals.co.uk Basically,
Im working on a game in Java and having an issue (i believe its
I am working on a program and I am having an issue with three
having an issue supporting IE6 (meh).. I have an update panel that is triggered
I know there are already articles that covered this, but I'm having an issue

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.