Arduino Mega 2560 problem moving Marlin.h to the build folder

Please help! Having problems verifying and uploading file to my Arduino. Running windows 7. This has worked in the past. Had successfully uploads, this was around 6 months ago. Using COM3 with successful serial monitor connection. Reprogramming the file now and keep getting the following message:-

problem moving Marlin.h to the build folder

java.io.IOException: Could not replace C:\Users\JONATH~1\AppData\Local\Temp\build1816583232684137088.tmp\Marlin.h
at processing.app.Base.saveFile(Base.java:2222)
at processing.app.Sketch.preprocess(Sketch.java:1465)
at processing.app.Sketch.preprocess(Sketch.java:1339)
at processing.app.Sketch.build(Sketch.java:1585)
at processing.app.Sketch.build(Sketch.java:1567)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1897)
at java.lang.Thread.run(Thread.java:619)
processing.app.debug.RunnerException: Problem moving Marlin.h to the build folder
at processing.app.Sketch.preprocess(Sketch.java:1468)
at processing.app.Sketch.preprocess(Sketch.java:1339)
at processing.app.Sketch.build(Sketch.java:1585)
at processing.app.Sketch.build(Sketch.java:1567)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1897)
at java.lang.Thread.run(Thread.java:619)

Any ideas why I cant upload/verify?

Thanks

• Shutdown the Arduino IDE

• Clear your %TEMP% directory

• Restart the Arduino IDE and try again

Thanks for the reply.

Have cleared the temp directory and restarted the program.

Still getting the same message.

java.io.IOException: Could not replace C:\Users\JONATH~1\AppData\Local\Temp\build1816583232684137088.tmp\Marlin.h

After you try to Verify and the Arduino IDE outputs the error messages does the build{longnumber}.tmp directory exist in your %TEMP% directory? Is Marlin.h in that directory?

Correct, the build{longnumber}.tmp does exist in the temp directory. Marlin.h is in that directory.

Do you have the Marlin library installed in more than one location? (i.e. Sketch directory and Arduino directory)

I dont know...How do I find these directories?

What I would do...

• Open a command shell...
• Click Start
• Type cmd and press Enter

• Navigate to the root directory...
• Type [u]cd [/u] and press Enter

• Search for Marlin.h...
• Type dir Marlin.h /s and press Enter

The output will look something like this...

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\ >cd \

C:\ >dir Marlin.h /s
 Volume in drive C is SW_Preload
 Volume Serial Number is 42EB-382C
File Not Found

C:\ >

:slight_smile: :slight_smile:

Found the problem. It was a corrupt file.

I uninsulated all arduino, re-installed 0.23. I then used an older file and all is good and working

Phew!

Thanks to all for your help

3dpod

You are welcome. Glad to hear you have it working.