2

I have multiple folders under a root directory, within each is an icon (.ico) file which acts as the icon for the parent folder.

Unfortunately, a lot of these .ico files are named "Untitled-*.ico" (due to laziness!), and more importantly, the IconResource field in the desktop.ini files are all absolute filepaths (e.g. f:\library\folder1\folder2\untitled-1.ico,0), which is no good if the drive changes letter, for example (it's a removable drive), or folders are moved.

What I would like to do is:

A) Rename all those "untitled-*.ico" to folder.ico

B) Change all the desktop.ini files IconResource fields to "folder.ico,0" (hence removing the absolute file path from the name).

Any help/suggestions gratefully received.

asked Jul 24, 2014 at 12:27
1
  • I asked about the renaming - tried the Powershell solution, but couldn't get it to work. Plus I need it to rename in conjunction with the desktop.ini editing. The one without the other would be worse than doing nothing. Commented Jul 24, 2014 at 15:52

1 Answer 1

0

for A)Use a third party application to batch rename like this one http://www.den4b.com/?x=products&product=renamer

for B) use notepad++ , open all files simultaneously and use the find and replace in all open flies option. Use regular expression to search part of text starting f:/ and ending .ico

answered Jul 24, 2014 at 17:46
5
  • 1
    Could you give a concrete example? As is, you're just saying to the user to search more, which doesn't add anything to the state of things. Commented Jul 24, 2014 at 18:10
  • Thanks for A, that will be useful. However, I have over 300 desktop.ini files that need editing. I can't open each one Commented Jul 25, 2014 at 7:16
  • OK, I've tried notepad++ but am having trouble with the "Find what" field in the Find in Files option.\n What should this be if I want to replace all occurrences of IconResource with IconResource=folder.ico,0 where the original IconResource string is variable? Commented Jul 25, 2014 at 14:08
  • Sorted. I figured it out - now all my folders have their own icons which will travel with them where-ever they may go :) Commented Jul 25, 2014 at 17:20
  • Great! Could you please mark the answer as accepted too if this was satisfactory? Commented Jul 25, 2014 at 21:32

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.