SaveCurrent File as .PNG automatic, not a copy..smart like

I'm looking for a script that takes the file I'm working on.. usually a .psd looks at the current saved filename and where its existing saved directory location is, and saves out a .PNG file to the same directory overwriting any existing file that might already exist with the same filename and extension.
So if i'm working on buttons.psd, I use the script.. it should save out a buttons.png to the same directory as buttons.psd ... no message prompts pestering me to remove the stupid " copy.png" string.. and no prompts about the interlaced choice. Just automated.. it would be HUGE time saver.
wouldn't mind if it could be adapted to do the same for other formats like .jpg, .gif aswel.. but mainly working with png files, and the constant baby sitting and ok promts, renaming files (ie removing the sodding copy string.. " ok the overwrite propmt etc etc etc .. .. the constant Adobe donkey **** application workflow that has still yet to be improved is really killing.

#target photoshop
app.bringToFront();
$.localize = true;
docRef = app.activeDocument
var x = separateFileName(docRef.name)
theFile = new File ( docRef.path + "/" + x['filename'] + '.png')
if (theFile.exists) {
theFile.remove()
docExportOptions = new ExportOptionsSaveForWeb
docExportOptions.format = SaveDocumentType.PNG //-24 //JPEG, COMPUSERVEGIF, PNG-8, BMP
docExportOptions.transparency = true
docExportOptions.blur = 0.0
docExportOptions.includeProfile = false
docExportOptions.interlaced = false
docExportOptions.optimized = true
docExportOptions.quality = 100
docExportOptions.PNG8 = false
docRef.exportDocument (theFile,ExportType.SAVEFORWEB,docExportOptions)
function separateFileName(theFileName){
if (/\.\w+$/.test(theFileName)) {
var m = theFileName.match(/([^\/\\]+)\.(\w+)$/);
if (m)
return {filename: m[1], ext: m[2]};
else
return {filename: 'no file name', ext:null};
} else {
var m = theFileName.match(/([^\/\\]+)$/);
if (m)
return {filename: m[1], ext: null};
else
return {filename: 'no file name', ext:null};

Similar Messages

  • "The file 'x' could not be copied because this computer is not authorized."

    I am trying to get an app (VSCO Cam) from my sister's iTunes library. We are logged onto the same home share network, and I can open her library just fine, but when I click the app and click "Import", a box shows up and says, "The file "VSCO CAM could not be copied because this computer is not authorized." I'm not sure wat computer it's talking about, buton both computers we've got up to the "Store" button, clicked "Authorize this computer", and we've entered OUR OWN Apple ID's. Now, the one we use for homesharing is different, and we both have our own apple ID's, which I put in my own, and she put in her own when asked to authorize our computers. Should we be putting in the ID we use when we homeshare when asked to authorize? Or will that change everything about our iTunes libraries.
    I can import a song just rom her library just fine, it's only when I try to do the app/.

    Hi john,
    Follow the troubleshooting steps in this article:
    http://support.apple.com/kb/ts1389
    Cheers,
    GB

  • Save a pdf file without Adobe automatically adding "-Copy" to the end

    How can I save a pdf file without Adobe automatically adding "-Copy" to the end of file name?

    If you have actually made any changes (e.g. adding a Sticky Note or filling out forms), the Save button will appear in the bottom toolbar.  It will save it as the same name.
    "- Copy" is added only when you tap/click the Save As button.  You can change it to something else, if you'd like.

  • Png type not recognized in widget - how to edit file type?

    Dear all,
    I almost got crazy these last hours as a nice widget I am working on suddenly refused to work.
    I now understand the source of the problem: the file type of the PNG background image is not "Portable Network Graphics Image" but "Adobe Photoshop PNG".
    This causes the widget to refuse to load, apparently.
    I can not find a way to edit this (even FileInfo does not propose PNG?)... or to make photoshop produce a generic PNG.
    Has anybody encountered this problem and/or has an idea on how to solve it?
    I can not imagine that there is no way in mac os x to edit the inner properties of the file..
    THANKS for any hint,
    Olivier.

    Hi
    I think there's a similar issue in Fireworks, where the native file format appears to be an extended form of PNG. In Fireworks, there's a file export command, which enables you to create a separate copy of the file in PNG (or any other) format whilst retaining the extended PNG for the master version of the file. I'm not a Photoshop user but I would look to see if there's an "export" command, and I would use it to create a separate PNG version of the file, in the hope that this does not have any of the extensions.
    Bob

  • How to stop copied files from being automatically trashed

    so this has only been happening recently, in the last 2-3 weeks.
    if i choose a file, say "example.txt" and duplicate it, adding "example copy.txt" to the desktop, within a couple seconds, it gets automatically placed in the trash.
    if i rename the copy to "example.2.txt" and move it back to the desktop, it'll stay. so it's not an issue of identical files being trashed. if i take it and name it back to "example copy.txt" it gets placed in the trash again automatically.
    how do i stop this? it's driving me mental because i have to go retrieve everything i copy from the trash bin. i'm sure i haven't downloaded any automators or anything, so any kind of input would be beneficial.
    thanks!

    whats the type n contents of this files.it is text only pipe seperated.
    have u specified the bad or log file path while creating the external file.no I do not. I use simple UTL_FILE for writing to these files but it does generate .log all the time and sometimes .bad whenever there is some problem.
    the sample script used for create external table is mentioned below.
    CREATE TABLE "XX"."E_ERROR_LOG"
    (     "SERVER_ID" VARCHAR2(24),
         "MONITOR_ID" VARCHAR2(24),
         "XXX_ID" VARCHAR2(8),
         "XXX_SUBTYPE_ID" VARCHAR2(8),
         "ERROR_CODE" VARCHAR2(6),
         "LOG_TIMESTAMP" VARCHAR2(19),
         "ERROR_MESSAGE_BODY" VARCHAR2(1024),
         "XXXX_MESSAGE" NVARCHAR2(1024)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "XXXX"
    ACCESS PARAMETERS
    ( records delimited by newline
         fields terminated by '|'
         missing field VALUES are NULL
    LOCATION
    ( 'DF_XXXX_ERRORLOG_DATA01.dbf'
    REJECT LIMIT UNLIMITED;
    ----------------------------------------------------------------------------------------------------------

  • My iWeb Account wont update it says Can't create the file "mwmac_white.png." The disk may be damaged or full, or you may not have sufficient access privileges... This has never happend  I deleted other sources on website and still wont work? Suggestions?

    My iWeb Account wont update it says Can’t create the file “mwmac_white.png.” The disk may be damaged or full, or you may not have sufficient access privileges... This has never happend  I deleted other sources on website and still wont work? Suggestions?

    Welcome to Apple Support Communities.
    This is the image contained in the file causing the problem...
    I certain the original is contained in the Combo updates and on the OS disks.
    As a temporary fix, click on the image above to open it.
    Use Screen capture (Shift+Command+4) and click on the opposite corners of the image.
    It will be saved as a Screen shot 2011-mm-dd at hh:mm.png
    Right click on the filename in Finder and rename it to mwmac_white.png
    I'm not certain, but the file might need to be moved into the Documents directory in the Subdirectory named for the website name you are editing. That's where it is on my system, but I moved a bunch of files when I restored from Time Machine about 18 months ago.
    I also have many copies of mwmac.png, a separate copy one for each web page where the image appears in my website.

  • How automatically saving a copy when saving a file?

    Hi,
    For my pictures (RAW and PSD) I use a separate external disk, our Timecapsule would be full in a year. My work flow in copying is normally no problem. But of course now my iMac drive is 'broken' I find a few PSD-files not be copied to the external drive. I wondered, is there a simple way to automatically save a copy when saving a file (and replace an earlier version of the copy)?
    Murk

    Thanks. FWIW I'm very keen on improving tethering and lobbied Adobe endlessly until they added the overlay for shooting into layouts because it was a major reason why some of my clients were unable to switch to Lightroom from PhaseOne. But we have to be realistic and remember that tethering just isn't a key market for Adobe as it is for PhaseOne, so progress is painfully slow. For example, where is live view or setting exposure which are in PhaseOne? I'd be amazed if we get those features for a few versions, and that's why I point serious tethered shooters to other solutions. And realistically, assuming your understanding of the SDK is correct you shouldn't expect a change until the next full version of Lightroom.  Good if it happens, but I wouldn't bet on it.

  • HT6114 thanks a bunch Apple..why not give me the option to save the Mavericks installation file instead of automatically deleting it

    I live out in the country and have slow broadband. The download took a few minutes short of 12 hours. I have 3 Macs to upgrade to Mavericks and read that I could copy the installation file to an external drive and use that to upgrade the others.
    Before the first installation, I checked the Downloads folder for the file but couldn't see it. I though ok, I'll run the install and look for it afterwards. Still couldn't find it afterwards so have googled and found that the installation file is deleted automatically after the installation. Bloody brilliant. I now have another 12 hour download to run.

    Clock Kate wrote:
    My main complaint still stands...why not give us the option to save the installation file before it is deleted. Not user friendly.
    If Apple were to bring up a dialog explaining all the consequences of running the installer and asking for your confirmation of each one, that would be frustrating and confusing. Most people have one Mac, they install the OS and it is not needed again. It just takes up space. If you want to create an installer disk, there are instructions for doing so.
    Congratulations. You have learnt how the installer works through your own experience!  All it cost you was your time. Not all experience is so easily gained.

  • Download Helper, even with paid converter upgrade, gives "Invalid Capture File" errors and will not record audio, with "File Creation Error - Unable to rename/copy audio file" Error.

    Download Helper Screen Capture worked to capture video if the default "no audio" option is active. But, no audio. The "speakers" or "microphone" audio options are confusing....the audio to be captured is from the video, so what do you choose? With either "speakers" or "microphone" selected, the captured file has poor audio and no video. Re-capture efforts (speakers) get "Invalid capture file error" and "File Creation error- Unable to rename/copy audio file"
    The paid upgrade of "Converter" doesn't work.
    Instructive documentation - not very good.
    Suggestions - Need time delay between initiation of "Record" and starting the video to be recorded.
    Could use timer tracking of the record process.
    Are there operating system limitations? (Have Windows XP Pro)

    That is an issue for the developer of that Download Helper.

  • I recently bought a new computer and had all my files moved to it. Now when I sync my iPad and iPod I get a message stating that some (41) of my items can not be copied to my PC because it is not authorized even though it is authorized on my account.

    I recently got a new PC and had all of my files moved to it. However, when I sync my iPad and IPod nano I get a message that states that 41 of my items can not be copied to the PC because it is not authorized on my account even though it is. I have tried de-authorizing it and re-authorizing it but they still will not copy. Any thoughts on how I can get them to copy?

    "Note: If you no longer have access to a computer that is using one of your authorizations, you can deauthorize all of the computers associated with your account by following the steps at the bottom of About iTunes Store authorization and deauthorization".
    Authorize the new computer. Launch iTunes. Go to the menu bar click Store / Authorize This Computer.
    Sync your iPod.

  • Rescue and Recovery 4 DOES NOT RESCUE/COPY LARGE FILES?!

    Hello all,
    Thank you in advanced for helping me out/any helpful advice you may have.
    System:
    Windows XP Professional
    T61
    4 GB RAM
    2.50 Ghz Dual Core Intel Processor
    120 GB Hard Drive
    140m nVidia Quadro video card (256 MB available memory I believe)
    Problem Summary:
    I ran into the unlucky computer problem of having a Microsoft.net framework addon for Firefox 3.5.3 result in a fatal interaction leaving me unable to boot up in both safe and normal mode. If you do have this addon, please uninstall it NOW, so that it does not happen to you. There is no current fix or patch for it as far as I know. Luckily, I have the (formerly) fantastic Rescue and Recovery 4 to backup my files and fix things.
    So in sequence of what I did:
    Tried several different attempts to fix problem to no avail (via google searches on the Rescue and Recovery Browser)
    Decided that it would be best to just reformat the drive and start a clean install.
    I had not done a real back up recently (several months due to my own carelessness and being busy).
    I chose to do a full factory restore using the 'Rescue My Files' option, since I had never done a backup using the included Lenovo Software, I usually just ran my own manual ones in Windows.
    To be on the safe side, I just decided to transfer my entire hard drive directory 'C:' to my 500 GB External Western Digital Hard Drive. I know I didn't really NEED all the files (like program files I would just need to reinstall anyway). I just wanted to return my computer to how it was as fast as possible.
    Rescue and Recovery registered as copying all my data (rougly 50-60 GB) of data to my external USB Hard Drive.
    I then unplugged my External USB Drive From the computer once it said it was complete. Rescue and Recovery proceeds with the factory restore.
    Things are going well, factory restore is successful, no problems yet.
    Once Windows was functional again and I had remade my usernames and settings just as it was before the crash, I plugged in my External HD again to restore my files.
    Every file that I copied was there EXCEPT FOR MY MOST IMPORTANT ONES. It appears the directory, 'C:\Documents and Settings\Justin\My Documents'
    AND
    'C:\Documents and Settings\Justin\Desktop'
    DID NOT COPY. I DID A DOUBLE CHECK, and the program said that all files had transferred successfully and I saw the directories on the USB Hard Drive in the Rescue and Recovery View. (I did not do a double check on another windows computer with my USB Hard Drive, however as I did not have access to one at the time and I was trusting in the Lenovo software, which did actually manage to rescue all the files, except for my most important ones.)
    Is there anyway way that:
    That because these files were so large (probably account for 50% of all data copied to my external USB Drive or 10-15 GB a piece), that the Rescue and Recovery file simply "passed over them"? The other files appeared to copy perfectly fine.
    There was an error with the program, like a file size limit cap that Rescue and Recovery cannot surpass so they were just skipped over?
    My own carelessness? Are all the root files not selected when you choose the entire 'C:' Drive as a directory? I did just choose to copy/rescue the entire 'C:' Drive and everything else (besides my two most important files) seemed to copy over so I do not beleive that this is the case.
    I did not individually, select each file in the 'C:\Documents and Settings' because I assumed that it would select each of the root files within it. (Is that not the case?)
    That the files are 'hiding' somewhere due to their large size?
    Most importantly of all:
    IS THERE ANYWAY THAT I CAN RECOVER MY DATA? There is about 2 years worth of photos, music, documents, etc. that I would like to have back that I do not have a recent back up of. 
    If anything, does anyone know WHY this happened? It was my understanding that Lenovo Rescue and Recovery was some of the best software for emergency crashes out there. And now it has failed me miserably. I'd at least like to know why it happened so that I may not repeat my mistake (or put too much faith in Lenovo) for the future.
    I've run some data recovery software but I know it will not recovery all the files that I once had in their state before my hard drive was reformatted back to factory settings.
    Thank you,
    -nofeet3
    Justin

    Hello , and ARGH !
    I AM HAVING THE EXACT SAME PROBLEM RIGHT NOW !
    If anybody could help this would really be appreciated .
    Here is the story
    Lenovo SL500
    Windows XP SP3 I think
    Specs maybe not too important
    My computer has some corrupted file and will not boot in normal or safe mode . When I try to do either , it starts booting , but before it finishes the load-up-windows screen , it displays an error message which says 
    " lsass.exe - System Error
    the endpoint format is invalid "
    and then goes no further , and the machine simply restarts itself again and would do this indefinitely if I didn't stop it .
    SO when it starts booting and shows the Lenovo Logo , I press the Lenovo Help/Tool Button to enter Rescue and Recovery [not sure what version it is , I cannot find information within it] and it gives me the option to Rescue files before recovering the system . I have the same problem as Nofeet3.
    It rescues all the small files
    BUT WILL NOT RESCUE ANY OF MY IMPORTANT FILES
    CERTAINLY IT DOES NOT RESCUE ANYTHING BIG [or bigger than roughly 2mb]
    It rescues picture files BUT WILL NOT RESCUE MUSIC FILES !!
    It may not even rescue bigger picture files , but I haven't noticed any pictures it has not copied since I can't go through ALL my picture files to see exactly what it has / hasn't copied.
    However , not a single music file is copied.
    It will NOT show up on the hard drive . What is strange , is when I try to plug the hard drive back in to try and copy the music files again , as I tried it a few times , it asks me if I would like to Write these files over the files already there , as though it has already copied. I check the hard disk , and these fils have definitely NOT copied onto the Disk . They are nowhere to be found .
    I don't think the files are hiding , but if they are , maybe somebody could tell me where.
    I suspect though that Rescue and Recovery has "recorded"  the files as having been copied , some kind of record , EVEN THOUGH THEY HAVEN'T !! Or if they have , they are absolutely invisible . WEIRD !
    nofeet3
    It is NOT because you selected the whole C drive , and is not due to any carelessness on your part. I have selected all files individually , and have tried time and time and time again , when I plug the ext hard drive into my other laptop to see if the files copy , they don't . I have tried this over and over and over again desperately all today , it is not working , even going so far as to select individual files rather than bigger directories to try and transfer in smaller in smaller batches ,just in case it couldn't handle large transfers all at once . That is not the case either . It just simply will not transfer files roughly bigger than 2mb . NO MUSIC !! THIS IS VERY FRUSTRATING !!
    I am not sure at present whether this program can rightly be called "Rescue and Recover". It is one of the main reasons I selected Lenovo  , and this is not a good demonstration of it's abilites at all .
    PLEASE HELP ME !!
    ANY HELP WOULD BE HIGHLY APPRECIATED !!
    Thanks so much in advance for any help anybody can give , and best regards ,
    Carl .

  • I have made a bootable copy of ML and want to load it on another laptop running SL. What do I need to do in order to avoid losing any files. I do not want to do a clean install.

    I have made a bootable copy (8GB thumb drive) of ML and want to load it on another Apple laptop running SL. What do I need to do in order to avoid losing any files. I do not want to do a clean install. I know ML is comptible.

    I'm getting an error message when ML is almost completely installed and it stops the install. Is there any way to get back to the snow leopard operating system and scrap the ML install at this point. I had to shut the Mac book off and when I started again it tried to install ML a second time. It is still trying to install but at this point I don't want to screw anything up any further so just want to get back to SL.
    Any suggestions.

  • Error message: Could not save copy as "C:..." because the file is already in use or left open by another application

    I always get the Errormessage: Could not save copy as "C:..." bacause the file is already in use or left open by another alpplication
    while trying to save a file as a jpg. even when the file is not left open or in use.. .

    Without knowing exact technical details, nobody can say anything. From genuine issues with your storage devices like block errors or fragmentation to specific security stuff causing delays and blockages in writing files anything is imaginable. Your info is simply insufficient to make even a superficial diagnosis beyond those generics.
    Mylenium

  • I have protected pdf files. You can not copy things, but it is allowed to print. In the menu of the pdf it says you are allowed to print. I already printed lots of times the document. But today there is an error "The printer is not admittet to print these

    I have protected pdf files. You can not copy things, but it is allowed to print. In the menu of the pdf it says you are allowed to print. I already printed lots of times the document. But today there is an error "The printer is not admittet to print these pdf". Its new. Theres no problem with the printer. I can print word documents, internet pages etc. But today I can not print anymore my pdf document, although printing is allowed and only copying is forbidden.
    How to solve the problem with the pdf?
    Thank you.

    Hi Hans,
    There seems to be other restrictions in the document that's not allowing it to print.
    Would it be possible to share the document with me so that I can have a look?
    Regards,
    Rave

  • HT2932 When I try to save a file from my GarageBand to my PC it keeps giving me a error message . Message says could not be copied because error occurred. The file cannot be found. Any suggestions?

    When I try to save a file from my GarageBand to my PC it keeps giving me a error message . Message says could not be copied because error occurred. The file cannot be found. Any suggestions?

    I was trying to upload from my iPad to my pc.
    That was hard for us to guess, from your post It might have helped to mention the iPad.
    How are you trying to save the song to your PC? Are you sending the song to iTunes? If yes, as a project or as an audio file? Make sure, you select "AAC" and not "GarageBand", when you share the song from your iPad.
    If the clip is not too large, you might alternately try to share it by mail, see:
    Share GarageBand songs

Maybe you are looking for

  • IPod touch does not sync or charge with specific Mac

    Hello, I've been having trouble connecting my iPod touch to an iMac4,1 1.83GHz Core Duo running Mac OS X 10.6. The Mac in question will happily sync with an older iPod nano (back when the screens were black and white), but not my iPod touch which is

  • Invalid username/password in case of oracle os authentication

    Hi, I am trying to connect to database using oracle local os authentication. REMOTE_OS_AUTHENT = false I am using oracle 11g. here is the code I am trying in two ways :- 1. OracleDataSource OracleDataSource ods = new OracleDataSource(); String url =

  • To display drill down values in the same table

    Dear Friends,     Suppose if you apply drill down on one object, it wont appear upper level values of that perticular object. If you want to display all levels of values in the same report during drill down.

  • Standard deviation MCXD

    Dear all               We have marked MIC as SPC characteristics and results are recorded for same now we are not getting standard  deviation and cp and cpk value in report as it is standard report it should show below value if there some setting req

  • Can I create *.JPG of a video shot with FLVPLayback

    Hi, I would like to do the following: I want to load an FLV file with event cuepoints and at each event, create a *.JPEG of the snaphot of the movie being played. I basically want to have a way to automatically create JPEG snapshots at each cuepoint.