TonySper
Tue Sep 25 08:06:06 PDT 2007
Cy,
Yes I did use the trim as you suggested. Also note that Anders suggested RUN
XCOPY "&FROM" "&TO" and that also worked. Now if I can figure out how to
open up a word application so that it does not stay on the taskbar when I
open it in Vista I may be able to get some work done.
Thanks
Tony
"Cy Welch" <cywelch@hotmail.com> wrote in message
news:29119805-4C19-4F7F-B774-0883ECF5582C@microsoft.com...
> Vista changes some of the rules having to do with the need for quotes from
> what I have seen. Since putting quotes seems to ALWAYS work, setting up
> the line like that seems to work better.
>
> Did you use the trim() also? I have seen that seem to make a difference
> in Vista as well.
>
> --
> Cy Welch
> Senior Programmer/Analyst
> MetSYS Inc.
>
http://www.metsysinc.com
>
> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
> news:#PXluhk$HHA.4200@TK2MSFTNGP04.phx.gbl...
>> Cy,
>> You de man. Works great. I still do not know why it works with XP and 98
>> and 95 but not Vista. What did they do with Vista to inhibit this??
>> Tony
>>
>> "Cy Welch" <cywelch@hotmail.com> wrote in message
>> news:6984E204-000F-495E-A699-A73905305793@microsoft.com...
>>> generate the entire run line as a text string (minus the run) and then
>>> use macro substitution to run the string, example provided below:
>>>
>>> runstring = [XCOPY "]+trim(from)+[" "]+trim(to)+["]
>>> run &runstring
>>>
>>> This should work in any OS as far as I know. Effectively this has the
>>> affect of actually doing:
>>>
>>> RUN XCOPY "C:\PFILES\*.*" "C:\BACKUP"
>>>
>>> But allows for the from and to portion to be different.
>>>
>>> --
>>> Cy Welch
>>> Senior Programmer/Analyst
>>> MetSYS Inc.
>>>
http://www.metsysinc.com
>>>
>>> "TonySper" <tsperduti@nospambellsouth.net> wrote in message
>>> news:uktKGij$HHA.5652@TK2MSFTNGP05.phx.gbl...
>>>>I have been using the RUN xcopy in an application using variables with
>>>>no problem until I installed it in a Vista Operating system.
>>>> from = "C:\PFILES\*.*"
>>>> to = "C:\BACKUP"
>>>> RUN XCOPY &FROM &TO &&This works OK in XP or 98 but not in
>>>> VISTA
>>>>
>>>> This will run in VISTA
>>>> RUN XCOPY "C:\PFILES\*.*" "C:\BACKUP"
>>>>
>>>> If I try and use the variables like in XP it will not run. There is no
>>>> error but the command window comes up and then shuts down.
>>>> I need the variables as they are field inputs that the user enters.
>>>> Any suggestion would be appreciated.
>>>> TonySper
>>>>
>>>>
>>
>>