Removing files with bad filenames from project

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I accidentally had 3 files with a space in their file name (late at night etc.)

 

Now I can't remove them from the project, right or left clicking on the file or sneaking up on the file name with the cursor brings up this screen and I can do nothing about that. AS 7.0.1188

 

This topic has a solution.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Wed. May 9, 2018 - 07:26 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The project file is just XML so if you are careful you can just remove the "dodgy bits" using a text editor. In fact Visual Studio itself (and hence I assume AS7 too) makes pretty good XML editor. The only issue is that if you try to load/edit a proj file then Studio will tend to treat it as an actual project file so you may need some kind of "open with" to make sure it just opens it for text editing. Alternatively just use Notepad++ or similar to edit it separately.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tend to use Notepad++ for this - it "understands" XML, so gives you the syntax highlighting, section collapsing, etc., etc

 

To get AS to edit it as XML, I would probably rename <project>.cproj to <project>.cproj.xml  - and back again when done ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The "fix", late last night, was to create dummy files with the bad filenames including the %20 (space but space not allowed). Studio was then happy to delete the non existing files.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
The only issue is that if you try to load/edit a proj file then Studio will tend to treat it as an actual project file so you may need some kind of "open with" to make sure it just opens it for text editing. 

I just stumbled on a way to do this!

 

In the 'Solution explorer', right-click the Project, and choose 'Unload'

 

When it's unloaded, you can right-click it and choose, 'Edit <whatever>.cproj' - this will open it as an XML file for manual editing.

 

smiley

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yup, that's the way I do it in Visual Studio with .vcxproj files all the time.