variable CP_OVERWRITE
Moderators: Dorian (MJT support), JRL
variable CP_OVERWRITE
Hi, some one can help me??, i don't know how to use this variable: CF_OVERWRITE, i wanto to copy a file but if it already exists, make a copy each time that i run my macro, in the help says than i need to setting this varibale with 1 but i dont know how, please, helpme.. thanks
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
CF_Overwrite
I was experiencing the same problem and added Let>CF_OVERWRITE=1 to my macro, but it still keeps adding a copy of the file rather than writing over it. When I open the macro in editor and view the script details on the right of the split screen, it still appears as CF_OVERWRITE=0.
I am at a loss here and can't seem to get this to simply copy a file over the same file. I am trying to update files on several workstations with new data from a single source workstation.
Please help me if you can.
Thanks!
I am at a loss here and can't seem to get this to simply copy a file over the same file. I am trying to update files on several workstations with new data from a single source workstation.
Please help me if you can.
Thanks!
I've used CF_OVERWRITE often and never had a problem. Make sure that the line in your script is exactly as you have posted it and that it appears in the script ahead of the CopyFile> function. The variable needs to be in all capital letters. Also make sure you have not somehow redefined "1". If you have inadvertently set the character "1" equal to zero then setting CF_OVERWRITE=1 would be equvalent to setting CF_OVERWRITE=0.
Hope this is helpful,
Dick
Hope this is helpful,
Dick
Thank you very much for your responses. That is working fine for me. If anyone is up for another simple challenge, I would like to copy a file over our network from that workstation to several others. I am not sure how to properly identify the other workstations?? This is how I have it set up now, but it clearly is not correct:
Let>CF_OVERWRITE=1
CopyFile>c:\temp\testdata.xls,\\Ringo\c:\temp\testdata.xls
The " \\Ringo\c: " is my attempt to copy the file from that workstation to a workstation over the network to the c: drive and temp folder of a workstation called "Ringo". I just don't know how to properly identify the destination for my macro over our network???
Thanks for taking a look at this!
Let>CF_OVERWRITE=1
CopyFile>c:\temp\testdata.xls,\\Ringo\c:\temp\testdata.xls
The " \\Ringo\c: " is my attempt to copy the file from that workstation to a workstation over the network to the c: drive and temp folder of a workstation called "Ringo". I just don't know how to properly identify the destination for my macro over our network???
Thanks for taking a look at this!
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Re: variable CP_OVERWRITE
FWIW a couple of trivial comments:denissesp wrote:Hi, some one can help me??, i don't know how to use this variable: CF_OVERWRITE,
I think the help is confusing to beginners (at least it confused me when I started ) because it generally instructs the user to "set" variables, but doesn't indicate that's the same as Let>CF_OVERWRITE=1
Also would be nice to either alpha sort the system variables listing, or group it logically.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Things like this are about to become more obvious and easier with version 9.0 ....
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Awesome! The $ symbol worked. However, it leads me to a final question...I promise! The file I am trying to copy is a Microsoft Access Application db file. The normal extension is .MDB for that type of file. How should I address that in the script? When I type "mdb" it seems to mistake that for some key stroke instruction.
So, my final questions for this little macro is what extension should I use for this file and/or do I have to use an extension at all?
Thanks
So, my final questions for this little macro is what extension should I use for this file and/or do I have to use an extension at all?
Thanks