AppendFiles command
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
AppendFiles command
Here is another request I had made that received no feedback. Any chance this will be in version 7?
=================================
I find that I have a frequent need to append files. The only
way I have been able to do this is to make batch files using the
DOS Copy command, and calling them to be executed. I see that
Adam Marder is doing the same thing (sample code in his email
response to the subject "CopyFile commentary" first brought up
by Robin Martin in early April 2002). Has anyone found a way to
do this using commands in MacroSched?
If not, could you consider this as a new command in the next
release. Perhaps is could be called "Append", and allow one to
append one or more files to a destination file. This would be
best allowing wildcards and allowing a string of multiple file
names as the source files, to be processed in the order listed
(use semi-colon as delimiter?). This would provide the same
capabilities as the DOS COPY command. Or perhaps, this can be
done with the existing CopyFile or WriteLn commands now, by
providing some different parameter options? Options should also
be provided to provide decisions about overwriting, and a result
value would also help (If the command was successful, result is set to zero. A non zero result means an error occurred). New file would be created if does not already exist.
Example follows.
==============================================
Command: AppendFile>source files, result, destination file
Example:
AppendFile>File1;File2;c:\folder\File3;d:\folder\temp\File4, c:\myfolder\AllMyFiles.txt. This would mean we would end up with a file named AllMyFiles.txt in c:\myfolder\ that would be the results of concatenating 4 files.
==============================================
=================================
I find that I have a frequent need to append files. The only
way I have been able to do this is to make batch files using the
DOS Copy command, and calling them to be executed. I see that
Adam Marder is doing the same thing (sample code in his email
response to the subject "CopyFile commentary" first brought up
by Robin Martin in early April 2002). Has anyone found a way to
do this using commands in MacroSched?
If not, could you consider this as a new command in the next
release. Perhaps is could be called "Append", and allow one to
append one or more files to a destination file. This would be
best allowing wildcards and allowing a string of multiple file
names as the source files, to be processed in the order listed
(use semi-colon as delimiter?). This would provide the same
capabilities as the DOS COPY command. Or perhaps, this can be
done with the existing CopyFile or WriteLn commands now, by
providing some different parameter options? Options should also
be provided to provide decisions about overwriting, and a result
value would also help (If the command was successful, result is set to zero. A non zero result means an error occurred). New file would be created if does not already exist.
Example follows.
==============================================
Command: AppendFile>source files, result, destination file
Example:
AppendFile>File1;File2;c:\folder\File3;d:\folder\temp\File4, c:\myfolder\AllMyFiles.txt. This would mean we would end up with a file named AllMyFiles.txt in c:\myfolder\ that would be the results of concatenating 4 files.
==============================================
Last edited by Bob Hansen on Tue Sep 24, 2002 1:43 pm, edited 2 times in total.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I've used AppendFile> for quite some time. A great little tool. History says it was introduced in September of 2002 in the release of version 7.0. Shortly after this thread was created. I was looking for it in the Command Reference and I can't find it. A search for AppendFile brings up a help item. Its also mentioned under CopyFile>, MoveFile> and RenameFile>
Am I missing something?
P.S. WaitClipBoard> seems to be missing also. I'd never heard of it until this thread.
Am I missing something?
P.S. WaitClipBoard> seems to be missing also. I'd never heard of it until this thread.
Select the link above and pick "Command Reference" from the list on the right of the screen. Or if your are in the editor, select the icon that is the little purple book with a question mark on it that also has a hint of "Command Reference". This is where I always go first when I'm looking for help with a function.
Yes they are mentioned in multiple other places. Just not where I spend most of my time looking.
Yes they are mentioned in multiple other places. Just not where I spend most of my time looking.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
AppendFile is missing from the list on the "MacroScript Commands" page in the help file. However, it is in the contents index in the left pane in the help file. I will ensure it is added to the main page.
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 JRL,JRL wrote:P.S. WaitClipBoard> seems to be missing also. I'd never heard of it until this thread.
Ditto on the above, surprised me too. I'm glad Marcus mentioned it in that post though... or I'm not sure when I might have stumbled across it. Even though I look at the "History" topic in the Help file quite often, I just didn't see that command.

Thanks Marcus for getting the online Help updated.
Its nice to see more and more users posting ideas to improve the Help.

Looks like I have some scripts to go and update now...
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 -
