%windir%\explorer.exe "%userprofile%\my documents\AXIS Media Control -
Recordings"
How can I write a simple script/.bat/cmd file that, no matter who is logged
on or where they have their "My Documents" folder at I can open an explorer
window to a specific folder in it. I also need this to work even if they
change their "My Documents" folder location via right clicking on the "My
Documents" icon and via its properties windows changing its location. Word
and other programs can deal with this so there must be a way unless Microsoft
had another one of their all to often MBD (Microsoft being dumb) days when
designing this part of the system.
Thanks for the help,
Ralph Malph
Even though you posted in microsoft.public.win3x_wfw_dos I suspect your
OS is rather more modern. It would help to know what OS your users are
using. Also, you may find more help in alt.msdos.batch (for DOS / Win9x
/ WinME) or alt.msdos.batch.nt (for WinNT / Win2K / WinXP).
To get you started, look at the output of:
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders" /v personal
or
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders" /v personal
I'm not sure which one actually points to My Documents in a system where
it has been moved from the default, but a brief experiment should reveal
it. That, along with an output parser like "find" or "for /F" or
similar should allow extraction of the desired directory.
Unfortunately, I'm not expert in using those tools, but the folks in
a.m.b / a.m.b.n are.
Good luck!
--
Zaphod
Zaphod's just zis guy, ya know?