Make an AppleScript from a MS-DOS batch file

Posted on 2004-11-15
Last Modified: 2013-11-17
I have a MS-DOS .bat (batch file) that I would like to convert in order to use on a Mac OSX as an applescript.  Here is the .bat file:

copy %1 \\computer_name\printer_share_name

Basically this allows the user to send a file to the shared printer that is located on a windows PC withouth having to map drives, and configure IP printing.  The actual .bat file is:

copy %1 \\rip2\10in_2

Thanks for any assistance.
Question by:EaglePress
    LVL 84

    Expert Comment

    How would you send a file to the shared printer from the Mac without AppleScript?

    Author Comment

    Currently, I am using AppleTalk with a 3rd party app (PC MacLAN) running on the windows machines that host the shared printers.  PC MacLAN makes the windows printers appear as apple printers.  I have the shared printerd configured on the mac normally.
    Here is the catch.  The files that I am having to send to the printer are .ps (post script) files. And the printer is actually an Imagsetter plate making maching that produces plates that are used on printing presses.  Now without going into a bunch of meaningless details, the Imagesetter appears and is treated like a normal paper (laserjet) network printer.
    When attempting to send the .ps files to the printer by just dragging the .ps file to the printer the file is not processed correctly.  I was hoping that using a applescript on the mac will give me the same results as the batch file on the PC.

    But to answer you question...I just drag the file to the printer description within the printer list.  On the pc i just drag the file to the .bat file that then copies the file to the shared printer.
    LVL 8

    Accepted Solution

    The batch file method on the PC is very specific to that platform and in this case doesn't offer a solution on the Mac. Printing a Postscript file on a Mac is as simple as dragging it onto the printer's icon on the Desktop (provided Desktop Printing is set up, of course - and it should be). There's no need for Applescript to play a part in this process.

    If you're doing this correctly and everything is set up as it should but are still having output problems, then it could be you need to change the System's printer driver. The two most commonly used are LaserWriter 8 and AdobePS - if you're using one of these, try the other and we'll take it from there.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
    Does your iMac really need a hardware upgrade? Will upgrading RAM speed-up your computer? If yes, then how can you proceed? Upgrading RAM in your iMac is not as simple as it may seem. This article will help you in getting and installing right RA…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now