Error: "Build Failed: The directory is not empty"

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Error: "Build Failed: The directory is not empty"

Post by ccardimon »

What should I do if I encounter the error "Build Failed: The directory is not empty" when trying to build my PDF output?
Craig

Lost in Disturbia
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Error: "Build Failed: The directory is not empty"

Post by dorcutt »

I usually encounter this error when I've been manually opening a file in my Output folder. For some reason, this seems to sometimes stop Flare from auto-clearing the output folder, even if I have since closed the file. I just close anything relevant that I have open, delete the contents of that target's Output folder, and run the build again.

Not sure if you're having the same issue though.
-Dan, Propellerhead-in-training
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Error: "Build Failed: The directory is not empty"

Post by ccardimon »

Thank you.
Craig

Lost in Disturbia
BrianBXYPRO
Propeller Head
Posts: 23
Joined: Tue May 03, 2016 12:04 pm
Location: Simi Valley, CA

Re: Error: "Build Failed: The directory is not empty"

Post by BrianBXYPRO »

I've been getting this error a lot today but I've found that if I close Flare and then reopen it the problem goes away.

Brian
Flare ( :flare: ) v12, Windows 10
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Error: "Build Failed: The directory is not empty"

Post by Nita Beck »

Instead of restarting Flare, maybe just clean the project (which deletes everything in the Output folder) and then try to build the PDF. So that's Project > Clean Project.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
BrianBXYPRO
Propeller Head
Posts: 23
Joined: Tue May 03, 2016 12:04 pm
Location: Simi Valley, CA

Re: Error: "Build Failed: The directory is not empty"

Post by BrianBXYPRO »

Hmmm. I'm starting to think it's a Flare 12 issue because it only happened a handful of times with Flare 11 but on Flare 12 it's a daily occurrence for me. Also, it only happens on my print outputs and never the online ones.

Brian
Flare ( :flare: ) v12, Windows 10
netwrk219
Propeller Head
Posts: 26
Joined: Mon Nov 28, 2016 8:58 am
Location: Fort Mill, SC

Re: Error: "Build Failed: The directory is not empty"

Post by netwrk219 »

I've found that if you have the app "AdobeCollabSynch.exe" running in Taskmaster, that this is the reason for the error. It keeps a copy of the document built and displayed in Acrobat, so that it isn't really deleted. I couldn't find a way to properly delete it and since I heavily use Creative Cloud apps for work, I decided to simply rename the file by taking one character out. Now, I can find it and use it if it is ever necessary and since I did this the error hasn't returned.

Hope this helps a future Flare traveler.
Keith S.

“Most of us find our own voices only after we’ve sounded like a lot of other people.” –Neil Gaiman
Dee Vincent-Day
Propeller Head
Posts: 62
Joined: Mon Jan 04, 2016 7:39 am
Location: York, North Yorkshire, England

Re: Error: "Build Failed: The directory is not empty"

Post by Dee Vincent-Day »

I get this happening a fair bit. I just start the build again and it runs ok. It usually happens when I have been viewing an output then closed it and clicked Rebuild Target.
Dee Vincent-Day
Technical Author
Piksel

liberating viewing | Piksel.com

http://www.piksel.com
bwait
Propeller Head
Posts: 11
Joined: Wed Aug 01, 2012 5:21 pm

Re: Error: "Build Failed: The directory is not empty"

Post by bwait »

Hi folks

We are running Flare 2017 and are seeing this bug a lot. I found that if I use Windows to delete the Output folder entirely, it fixes the problem, albeit temporarily. I have tried the Clean Project command too, but it cannot delete everything for some reason. It appears that the same files that Clean Project fails to delete are those blocking the build, which makes sense. MadCap should fix this bug.
netwrk219
Propeller Head
Posts: 26
Joined: Mon Nov 28, 2016 8:58 am
Location: Fort Mill, SC

Re: Error: "Build Failed: The directory is not empty"

Post by netwrk219 »

bwait wrote:Hi folks

We are running Flare 2017 and are seeing this bug a lot. I found that if I use Windows to delete the Output folder entirely, it fixes the problem, albeit temporarily. I have tried the Clean Project command too, but it cannot delete everything for some reason. It appears that the same files that Clean Project fails to delete are those blocking the build, which makes sense. MadCap should fix this bug.
I turned off AdobeCC Auto sync and it helped with this issue quite a bit. For some reason though, stopping the sync capability to AdobeCC only works for a bit, then it turns itself back on again, possibly through Acrobat. One person in this thread mentioned that it wasn't a Madcap issue but an Adobe one and they were absolutely right. The issue stems from Adobe not releasing the file completely after editing is complete. I have added a link below to a screenshot of the Adobe CC screen where the option is located.
https://drive.google.com/a/colossalarts ... sp=sharing
You do not have the required permissions to view the files attached to this post.
Keith S.

“Most of us find our own voices only after we’ve sounded like a lot of other people.” –Neil Gaiman
rkotraba
Jr. Propeller Head
Posts: 7
Joined: Mon Jan 22, 2018 8:51 am

Re: Error: "Build Failed: The directory is not empty"

Post by rkotraba »

Thanks for posting this fix--this worked to solve the issue for me.
netwrk219 wrote:
bwait wrote:Hi folks

We are running Flare 2017 and are seeing this bug a lot. I found that if I use Windows to delete the Output folder entirely, it fixes the problem, albeit temporarily. I have tried the Clean Project command too, but it cannot delete everything for some reason. It appears that the same files that Clean Project fails to delete are those blocking the build, which makes sense. MadCap should fix this bug.
I turned off AdobeCC Auto sync and it helped with this issue quite a bit. For some reason though, stopping the sync capability to AdobeCC only works for a bit, then it turns itself back on again, possibly through Acrobat. One person in this thread mentioned that it wasn't a Madcap issue but an Adobe one and they were absolutely right. The issue stems from Adobe not releasing the file completely after editing is complete. I have added a link below to a screenshot of the Adobe CC screen where the option is located.
https://drive.google.com/a/colossalarts ... sp=sharing
ceriwilliams
Propeller Head
Posts: 13
Joined: Tue May 22, 2018 3:01 am

Re: Error: "Build Failed: The directory is not empty"

Post by ceriwilliams »

netwrk219 wrote:I've found that if you have the app "AdobeCollabSynch.exe" running in Taskmaster, that this is the reason for the error. It keeps a copy of the document built and displayed in Acrobat, so that it isn't really deleted.
Ending this task also worked for me. Thanks for sharing!
Landy
Propeller Head
Posts: 47
Joined: Thu Apr 23, 2009 12:50 am

Re: Error: "Build Failed: The directory is not empty"

Post by Landy »

Yes, thanks netwrk219. Just had this same issue and killing that exe solved the problem!
88Schwind
Propeller Head
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Error: "Build Failed: The directory is not empty"

Post by 88Schwind »

I keep getting this message when I try to build a book. The error points to a directory that doesn't exist. I have tried every suggestion in this thread, and still the build fails. How do I get around this?
You do not have the required permissions to view the files attached to this post.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Error: "Build Failed: The directory is not empty"

Post by Nita Beck »

Is that path specified as the Output Folder in your target? That might be the issue. If that folder is specified in the target, Flare's going to look for it, and if it doesn't exist, the build will fail.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
88Schwind
Propeller Head
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Error: "Build Failed: The directory is not empty"

Post by 88Schwind »

When I select the target, then select Open Output Folder, this is the path. C:\Users\garyschx\OneDrive - Intel Corporation\MCF-Unite\Output\garyschx\Deployment-Guide-Enterprise
88Schwind
Propeller Head
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Error: "Build Failed: The directory is not empty"

Post by 88Schwind »

bwait wrote:Hi folks

We are running Flare 2017 and are seeing this bug a lot. I found that if I use Windows to delete the Output folder entirely, it fixes the problem, albeit temporarily. I have tried the Clean Project command too, but it cannot delete everything for some reason. It appears that the same files that Clean Project fails to delete are those blocking the build, which makes sense. MadCap should fix this bug.
For some reason, I am unable to delete the Output folder. Anyone know why that might be?
Also, it should be noted that a coworker was able to publish the book that failed for me, so all sorts of mystery surround this issue.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Error: "Build Failed: The directory is not empty"

Post by ChoccieMuffin »

Check that Acrobat isn't "holding onto" your generated PDF. I've sometimes even had to close Outlook to release the output! (Yes, I know, it's weird.)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
88Schwind
Propeller Head
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Error: "Build Failed: The directory is not empty"

Post by 88Schwind »

Here's a twist to the whole situation. I was able to delete the project output folder. However, there is something in the Temporary folder that I can't delete, and I wonder if this is what's preventing me from building the book. Is this a possibility?
You do not have the required permissions to view the files attached to this post.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Error: "Build Failed: The directory is not empty"

Post by Nita Beck »

I take it that you store your Flare project in OneDrive. MadCap recommends not storing Flare projects on network drives or in cloud spaces, such as OneDrive, Google Drive. I suspect that the issue you are encountering has to do with OneDrive rather than with Flare. With Flare closed, can you go out to OneDrive in the cloud and manually delete the Temporary folder? Then give OneDrive a little while to sync up with your computer. Thereafter, try to open the project again and see if you can build.

Per the Flare documentation:
Where to Store Projects
When you create new Flare projects, the default location is the Documents\Projects folder. However, you can choose any location you want. See Creating a Project.

It is recommended that you always store your project locally, rather than on a network. Of course, there may be times when you need to place a copy of your project on a network (e.g., to use source control, or to make a copy available to a co-worker). But performance and speed should be significantly better if you work on a local copy of the project rather than working on it from a remote server. Working on a remote copy of a Flare project is also not an ideal solution for team authoring, because there is not a good solution for resolving file conflicts between writers.
https://help.madcapsoftware.com/flare20 ... ojects.htm
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
88Schwind
Propeller Head
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Error: "Build Failed: The directory is not empty"

Post by 88Schwind »

I appreciate your response. You're correct. My files are on OneDrive. I closed everything and tried to delete the Temporary folder with no success.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Error: "Build Failed: The directory is not empty"

Post by Nita Beck »

Try something, then. Open up your OneDrive tray app and tell it to pause syncing. THen see if you can build in Flare.

The first thing that Flare does when you instrust it to build is to delete whatever was in the Output folder from the last prior build. I think because your project is in a OneDrive folder, the deletion of the Temporary folder doesn't really take place immediately bc OneDrive needs to sync your local drive with the cloud. That takes a bit of time. So Flare gets stuck.

But if you temporarily pause OneDrive's syncing, then you should be able to build. At least, this is my guess.

The best practice really is not to put a Flare project in a OneDrive, Box, Dropbox, etc., folder. That platform's syncing will bite you.

If you have the project in OneDrive so that you can co-author it with other Flare users, then you really should be using dedicated source control such as Git or SVN.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
88Schwind
Propeller Head
Posts: 20
Joined: Mon Sep 20, 2021 8:05 am

Re: Error: "Build Failed: The directory is not empty"

Post by 88Schwind »

Nita Beck wrote:Try something, then. Open up your OneDrive tray app and tell it to pause syncing. THen see if you can build in Flare.

The first thing that Flare does when you instrust it to build is to delete whatever was in the Output folder from the last prior build. I think because your project is in a OneDrive folder, the deletion of the Temporary folder doesn't really take place immediately bc OneDrive needs to sync your local drive with the cloud. That takes a bit of time. So Flare gets stuck.

But if you temporarily pause OneDrive's syncing, then you should be able to build. At least, this is my guess.

The best practice really is not to put a Flare project in a OneDrive, Box, Dropbox, etc., folder. That platform's syncing will bite you.

If you have the project in OneDrive so that you can co-author it with other Flare users, then you really should be using dedicated source control such as Git or SVN.
I'll give this a try. Also, after your previous post, I moved the files locally and that allowed me to build the books that were being blocked.
Post Reply