Converting filepaths when moving to a new computer

I’m finally leaving my trusty XP PC and moving to a (urgh) Vista one I bought a couple of years ago, but couldn’t face moving all the files and installing the software etc I use for programming.

I’m now editing the Ruby Rake setup file, that controls the compilation and building of the DDFileCatcher installation file, and using DDFileCatcher to get the new filepaths. Here’s how I did it:

XP file paths:
# set constant values:
MY_DOCUMENTS = “C:/Documents and Settings/Don Robinson/My Documents”
INSTALL_FOLDER = “c:/ruby/rake/ddfilecatcher4″
INSTALL_FOLDER_83 = “C:/ruby/rake/DDFILE~1″

Vista file paths:
# set constant values:
MY_DOCUMENTS = “C:/Users/Don/Documents”
Here, I used the “Forward slash folder” property. Drag the folder onto DDFileCatcher, save the folder path to the Clipboard in “All file properties on each line” mode. I had to delete the final forward slash, because of the way I wrote the Rake code that uses constants.

INSTALL_FOLDER = “c:/ruby192/rake/ddfilecatcher4″
I just edited this by hand (added “192″)

INSTALL_FOLDER_83 = “C:/Ruby192/rake/DDFILE~2″
I didn’t just edit this line, because the numbers (eg ~2) can change, depending on sister files or folders. I used the “Short forward slash filepath” property and dragged the folder onto DDFileCatcher. The number had changed from 1 to 2.

This one stayed the same, but I did use DDFileCatcher to get the forward slash short filepath again to be sure. I can’t think of an easier way to get a filepath like this one than using DDFileCatcher.

When I first thought of DDFileCatcher and wrote it for my own use in 2003, it was to get filepaths for installation scripts written in INNO Setup Compiler. It does a lot more now, but it still does the simple tasks.

About Don Robinson

I write DDFileCatcher and try to market it. Twitter #ddfilecatcher
This entry was posted in File listing tasks, Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>