Windows hard disk search
Mike Bonner
bonnmike at gmail.com
Wed May 11 18:35:28 EDT 2011
Just found this
On *Windows Vista/XP/2000*, the path is usually
%AppData%<http://www.mozilla.org/support/thunderbird/edit#appdata>
\Thunderbird\Profiles\xxxxxxxx.default\, where xxxxxxxx is a random string
of 8 characters. Just browse to C:\Documents and Settings\[User
Name]\Application
Data\Thunderbird\Profiles\ on Windows XP/2000 or C:\users\[User Name]
\AppData\Roaming\Thunderbird\Profiles\ on Windows Vista, and the rest should
be obvious.
So something like
put merge(" C:\users\[[$USERNAME]]\AppData\Roaming\Thunderbird\Profiles\")
into tVistaPath will give you the trunk at which point all you have to do is
determine the name of the random folder name created by thunderbird and tack
it on to the end of the path.
Or even more simple, for the merge string use
"[[$APPDATA]]\Thunderbird\Profiles\" since the appdata global will give you
everything up to roaming including the username
On Wed, May 11, 2011 at 4:24 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> Ah k, if the username is the issue, the system global var (at least on win
> 7, cant check on xp) is $USERNAME and should contain the current username.
> Might make it possible to hit it directly using the system global.
>
>
>
>
>
> On Wed, May 11, 2011 at 4:14 PM, Bill Vlahos <bvlahos at mac.com> wrote:
>
>> Mike,
>>
>> Thanks. I can narrow it down. This is very helpful.
>>
>> Bill Vlahos
>>
>> On May 11, 2011, at 3:11 PM, Mike Bonner wrote:
>>
>> > If you can narrow down the places to search, you can do this with a
>> shell
>> > command. You could technically do the whole drive, but it would be way
>> too
>> > slow to be worthwhile, but if you only have to search a small subset of
>> the
>> > drive it shouldn't be too bad.
>> >
>> > set the defaultfolder to "c:\where\to\start\looking"
>> > get shell("dir /s filetofind.pref")
>> >
>> > So to find all hosts files in the windows tree
>> >
>> > set the defaultfolder to "c:\windows"
>> > get shell("dir /s hosts")
>> >
>> > which returns parsable info as similar to the following.
>> >
>> > * Volume in drive C has no label.*
>> > * Volume Serial Number is C44E-B22E*
>> > *
>> > *
>> > * Directory of
>> >
>> c:\windows\winsxs\amd64_microsoft-windows-w..nfrastructure-other_31bf3856ad364e35_6.1.7600.16385_none_6079f415110c0210
>> > *
>> > *
>> > *
>> > *06/10/2009 03:00 PM 824 hosts*
>> > * 1 File(s) 824 bytes*
>> > *
>> > *
>> > * Total Files Listed:*
>> > * 1 File(s) 824 bytes*
>> > * 0 Dir(s) 858,688,282,624 bytes free*
>> >
>> >
>> > A whole drive search with this method takes way too long. I also wonder
>> if
>> > there is a registry key that will point you the right direction instead.
>> >
>> > On Wed, May 11, 2011 at 3:51 PM, Bob Sneidar <bobs at twft.com> wrote:
>> >
>> >> I wouldn't try to search for it if I were you. Just check for the OS
>> and
>> >> conditionally set the path accordingly. If it could be ANYWHERE, than
>> that
>> >> begs the question, what is it and who put it there?
>> >>
>> >> Bob
>> >>
>> >>
>> >> On May 11, 2011, at 2:14 PM, Bill Vlahos wrote:
>> >>
>> >>> I want to modify a prefs file on XP and Windows 7 computers. Since the
>> >> file could be in different places I can't count on knowing the path to
>> it.
>> >> How do I execute a search for the file by name in LC and get the path
>> to it?
>> >>>
>> >>> The file would only be on the user's hard disk not on any mounted
>> servers
>> >> so I want to restrict the search to just the user's drive.
>> >>>
>> >>> Bill Vlahos
>> >>>
>> >>> _______________________________________________
>> >>> use-livecode mailing list
>> >>> use-livecode at lists.runrev.com
>> >>> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> >>
>> >> _______________________________________________
>> >> use-livecode mailing list
>> >> use-livecode at lists.runrev.com
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> > _______________________________________________
>> > use-livecode mailing list
>> > use-livecode at lists.runrev.com
>> > Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
More information about the use-livecode
mailing list