Re: Passing ">" in a batch command

52 views
Skip to first unread message

Michael Metcalf

unread,
Dec 23, 2014, 5:32:58 PM12/23/14
to google-ap...@googlegroups.com
Anyone:

Building a batch script to write a ton user’s email signature’s to individual files… Dito gam doesn’t seem to accept the “>" command from the batch command but takes its just fine if I do it individually from the shell..

A line in the batch looks like this:
gam user test.user show signature > Desktop/B-300/Signature_test_user.html

This seems to work fine in the shell but not in the batch.

Please advise!!

+KimNilsson

unread,
Jan 2, 2015, 12:17:37 PM1/2/15
to google-ap...@googlegroups.com
I assume you've automated the naming format?
So the two first lines are something like this

gam user test.user1 show signature > Desktop/B-300/Signature_test_user1.html
gam user test.user2 show signature > Desktop/B-300/Signature_test_user2.html

So the target files are unique. If not, you will only ever get one signature into that file; the last one, since > overwrites previous content.

Have you tried using a CSV instead of a batch file?

Also, tried exporting all users to a single file and then splitting the content of that file instead?
gam all users show signature > Path/to/your/file.html 
Reply all
Reply to author
Forward
0 new messages