Calling Directories inWindows XP

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
eveits
Newbie
Posts: 3
Joined: Wed Jun 23, 2004 12:36 am

Calling Directories inWindows XP

Post by eveits » Wed Jun 23, 2004 8:45 pm

I want to use the directory "C:\My documents and settings" but MacroScheduler doesn't like the "and" in the directory name. I do not want to store my files in a separate directory. Is there any wasy to get around this problem?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jun 23, 2004 9:03 pm

Have you tried to use SUBST to map a drive letter to "C:\My documents and settings" ?

SUBST F:\ "C:\My documents and settings"

Then use F:\ in your macro script. If needed a lot, then you could add the SUBST to your autoexec.bat or into a batch file that runs at StartUp, or could inlcude in the Registry for Run.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

eveits
Newbie
Posts: 3
Joined: Wed Jun 23, 2004 12:36 am

Calling Directories inWindows XP

Post by eveits » Fri Jun 25, 2004 3:50 pm

Bob, thanks for input regarding my last two problems. Haven't tried to map a drive, but that may be the answer. I've not done that before, so will have to review the process. Solved my last problem regarding activating Macro Scheduler while in standby mode. Using the XP's scheduler and checking the box "start when in standby" solved the problem. Thanks again.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jun 25, 2004 10:11 pm

I should have mentioned that you can use the SUBST command in your macro script. Do not need to load it earlier. This is much cleaner.

Do something like this:
//Create Drive F substitution
Let>RP_WAIT=1
Run Program>cmd.exe /c SUBST F:\ "C:\My documents and settings"
Let>RP_WAIT=0
...
...
Do things with F:\
...
...
Label>End
//Remove Drive F substitution
Let>RP_WAIT=1
Run Program>cmd.exe /c SUBST F:\ /D
Let>RP_WAIT=0
Note: Using cmd.exe for XP environment. Use command.com for Win9X
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Jul 17, 2004 7:28 am

Hello eveits

I just happened to reread your problem:
I want to use the directory "C:\My documents and settings" but MacroScheduler doesn't like the "and" in the directory name.
I don't know where you are using "C:\My documents and settings" but Macro Scheduler does not usually have a problem with long filenames. "AND" is not a reserved word, it's not an operator like you see in other programs. If you are changing directory for example, do not use the quotes. Just use the full path as normal like this:
Change Directory>C:\My documents and settings

Make sure there is no space after the > character. Macro Schedule does read those blank spaces as characters and you may end up with unexpected results. Also beware of trailing spaces. You can remove those in the Editor. Click on Edit, Show All Chars, and Remove Trailing Spaces to see and remove those pesky characters.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts