Copy folders from PC to Laptop
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 19
- Joined: Tue Feb 20, 2007 9:43 am
Copy folders from PC to Laptop
I'm trying to get Macro Scheduler to copy a folder from my main PC to my laptop.
I want it to completely delete the folder which will already be on the laptop every time it does this so that I have no duplicate files & everything is completely up to date.
However I am getting stuck on the 1st bit, copy folder. I just can't see anyway to copy a folder, only files. I have searched through this forum & what I'm wanting must be a pretty basic feature but no luck.
Any help appreciated. Thanks
I want it to completely delete the folder which will already be on the laptop every time it does this so that I have no duplicate files & everything is completely up to date.
However I am getting stuck on the 1st bit, copy folder. I just can't see anyway to copy a folder, only files. I have searched through this forum & what I'm wanting must be a pretty basic feature but no luck.
Any help appreciated. Thanks
Simon Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You can use CopyFile to copy a folder:
CopyFile>c:\foldername,m:\
That would copy the folder "foldername" and all its contents to the m: drive.
CopyFile>c:\foldername,m:\
That would copy the folder "foldername" and all its contents to the m: drive.
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?
-
- Newbie
- Posts: 19
- Joined: Tue Feb 20, 2007 9:43 am
Thanks for the quick reply.
It works but its making a copy of the folder as it already exists.
How do I get it to delete the original folder & then paste it.
I don't want it to just overwrite the folder as this way old files will be left behind.
So far I have...
CopyFile>E:\My Documents\Leaflets,\\Laptop-advent\My Documents
Thanks again
It works but its making a copy of the folder as it already exists.
How do I get it to delete the original folder & then paste it.
I don't want it to just overwrite the folder as this way old files will be left behind.
So far I have...
CopyFile>E:\My Documents\Leaflets,\\Laptop-advent\My Documents
Thanks again
Simon Williams
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
MoveFile>E:\My Documents\Leaflets,\\Laptop-advent\My Documents
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?
-
- Newbie
- Posts: 19
- Joined: Tue Feb 20, 2007 9:43 am
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Ok, same thing would be:
CopyFile>E:\My Documents\Leaflets,\\Laptop-advent\My Documents
DeleteFile>E:\My Documents\Leaflets
CopyFile>E:\My Documents\Leaflets,\\Laptop-advent\My Documents
DeleteFile>E:\My Documents\Leaflets
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?
Hi Marcus,mtettmar wrote:You can use CopyFile to copy a folder:
CopyFile>c:\foldername,m:\
That would copy the folder "foldername" and all its contents to the m: drive.
The above ability is great, but the entry in the Help File only talks about copying files:
Could you possibly update the Help File to say that directories can also be copied and provide an example? That would be helpful.Help File wrote:CopyFile
CopyFile>sourcefile,destinationfile
Copies the file (or files), sourcefile, to destinationfile
sourcefile, and destinationfile may be variables. Wildcards can be used.
By default if destinationfile already exists it will not be overwritten and the new file will be renamed appropriately. It is possible to change the bahaviour of the CopyFile command to overwrite instead by setting CF_OVERWRITE to 1. The default value of CF_OVERWRITE is 0.
Abbreviation : Cop
See also : MoveFile, DeleteFile, IfFileExists, AppendFile, RenameFile
Example
CopyFile>c:\temp\myfile.txt,c:\my documents\myfile.old
Or with variables:
Let>filename=c:\temp\myfile.txt
Let>newfilename=c:\temp\myfile.new
CopyFile>filename,newfilename
Same thing for MoveFile> and possibly other commands?
Its just my opinion... but if the command can handle directories as well as files, I think the Help File should say so.
Also change typo bahavior to behavior.
Thanks for listening... and keep up the great work on the product and the support here on the forums.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Will do.
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?
-
- Newbie
- Posts: 19
- Joined: Tue Feb 20, 2007 9:43 am