#153319 - 2005-12-13 10:56 PM
If Exist Ren & Copy
|
jszei
Fresh Scripter
Registered: 2005-12-01
Posts: 17
|
Hey guys,
I am trying to rename a file on a PC if it exists then copy a file from a server to a PC as a new name. Here's what I've got but the syntax is wrong. Can anyone help? Code:
Dim $mapir $mapir="C:\Program Files\Common Files\System\Msmapi\1033" If Exist $mapir +"\"mapir.dll REN $mapir +"\"mapir.dll $mapir"\"mapir.old COPY "\\mnc17p1s\NETLOGON\batch\mapirnew.dll" $mapir +"\" mapir.dll End If Code:
Thanks & try to hold back the laughs, John
|
Top
|
|
|
|
#153337 - 2005-12-14 10:44 PM
Re: If Exist Ren & Copy
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Les said:
Quote:
I recognize that I have a low tolerance for mediocrity but see nothing before this post that should illicit such a response from you.
As an outside observer - I agree with Les's statement. jszei your taking these comments wrong (and way too personally). I can tell by your writing that your no dumby either. I've known Les for years now - can assure you that A) he's no racist and B) he knows what he's talking about. He just has a low tolerance for people asking questions about stuff thats clearly in the manual - thats all ;0)
|
Top
|
|
|
|
#153338 - 2005-12-14 10:51 PM
Re: If Exist Ren & Copy
|
jszei
Fresh Scripter
Registered: 2005-12-01
Posts: 17
|
My apologies Les. With all these people backing you up you must be a stand up guy. It just happens that my wife's native language is not english and is taking ESL courses. You struck a nerve.
If anyone is still willing to help me out after this my code is not renaming the file properly after updating Kix to 4.51. Code:
Dim $mapir $mapir="C:\Program Files\Common Files\System\MSMAPI\1033\" If Exist ($mapir + "mapir.dll") MOVE $mapir + "mapir.dll" $mapir + "mapir.old" /h /s COPY "\\mnc17p1s\NETLOGON\batch\mapirnew.dll" $mapir + "mapir.dll" EndIf
Thanks
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 382 anonymous users online.
|
|
|