Getting FileNotFoundException, but the file exists and is read/write

So I'm trying to input a file and i get this exception, but the file does exist and the directory is correct.
import java.util.Scanner;
import java.io.File;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
public class Assignment1 {
     public static void main(String[] args){
          File file = new File("C://Users//The RTV//Documents//Procject1//src//test.txt");
          if(file.exists()){
               System.out.println("*");
               BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
}when I remove the BufferedInputStream in = new BufferedInputStream(new FileInputStream(file)); The star prints, so the file does exist, but I keep getting that exception when I put the code back. I also get that exception when I remove the File file and the if statement and just have the buffered input. Can anyone explain to me why this is happeneing?

Procject1Typo?Less likely if file.exists() passes.
what about "file.canRead()"? You should also try this, could be a permissions problem.My best guess, despite the thread title. From the Javadoc for FileInputStream(File) :
Throws:
FileNotFoundException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
That last part seems kind of misleading.
Edit:
By the way are you logged on as "The RTV" when you test this?
Edited by: endasil on 10-Sep-2009 4:53 PM

Similar Messages

  • Adobe Illustrator CS4 Error: Error 1603. Error 1305.Error reading from file C:\Program Files\Adobe\Adobe Illustrator CS4\Support Files\Required\Fonts\AdobeSongStd-Light.otf.  Verify that the file exists and that you can access it.  AdobeColorCommonSetRGB

    Iam trying to load illustator in my PC i get following error while loading Application CD 2
    Adobe Illustrator CS4
    Error:
    Error 1603. Error 1305.Error reading from file C:\Program Files\Adobe\Adobe Illustrator CS4\Support Files\Required\Fonts\AdobeSongStd-Light.otf. Verify that the file exists and that you can access it.
    AdobeColorCommonSetRGB
    Error:
    Error 2.
    My serial no. [Removed by moderator]

    Download a copy an installer for CS4 from the links on this page:
    Other downloads

  • File Adapter - Check file exist before performing read

    Is there a feature in the file adapter or invoke activity for SOA 11.1.1.5 that performs a check to see if a specific file exists before it performs a read function? If file does not exist then move onto to next step, if it does then read it.
    I am trying to do this in 1 step instead of performing a listing of the directory first before perfomring the read.

    Hi,
    When you read a file, using the synchronous read file, you have to point to a file (file name, directory...). That way, when you are executing the invoke activity, followed by a FileAdapter, it's either the file exists, and you read it, or it's not exist and you don't read it.
    Arik

  • I reinstalled my OS as I do every year or so. when I install CS4 I do not have Premiere Pro Adobe Premiere Pro Error 1603. Error 1311.Source file not found: F:\Adobe CS4\payloads\AdobePremierePro4All\AdobePremierePro4All1.cab.  Verify that the file exists

    Error 1603. Error 1311.Source file not found: F:\Adobe CS4\payloads\AdobePremierePro4All\AdobePremierePro4All1.cab.  Verify that the file exists and that you can access it.

    And what exactly? You have not provided any system info or other details.
    Mylenium

  • My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any

    My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any advice is helpful. This has never happened in 6 years

    answered in your other thread LR 4 suddenly no longer recognizes files.

  • I have a folder and 3 files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked?

    I have an empty folder and 3 .jpg files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked and I have full read & write access.  Grateful for any assistance in solving this problem.

    Back up all data.
    Triple-click anywhere in the line below to select it:
    ls -@Oaen De* | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.

  • HT1926 just installed latest itunes to my pc, but now getting this message' the file itunes Library.itl cannot be read because it was created by a newer version of itunes. and now i cannot open itunes?

    just installed latest itunes to my laptop, and icon is on my homepage, but when i try to load it up, i get this message ,The File "itunes Library.itl" cannot be read because it was created by a newer version of itunes! Ive tried uninstalling it then installing again but nothing, ive ran scans on both itunes and quicktime to see what the problem is, and i just keep gettin this message! how do i fix this ANYONE please!

    The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes".
    Try the following user tip:
    Empty/corrupt iTunes library after upgrade/crash

  • To run iTunes in 64-bit mooose the "Get Info" command in the File menu, and uncheck the "Open in 32-bit mode" checkbox in the iTunes Info window. but i doesn't have the tick thing plus i redownloaded it a

    To run iTunes in 64-bit mode, select the iTunes application in the Finder, choose the “Get Info” command in the File menu, and uncheck the “Open in 32-bit mode” checkbox in the iTunes Info window. but i doesn't have the tick thing plus i redownloaded it again and same message comes up

    Have you disclosed the "General" brick in the "Info" panel? Click the disclosure triangle to the left of "General":
    What is your iTunes version and MacOS X version?
    -- Léónie

  • I take a .NEF file and a .JPG file with every click. When I transfer the files using a flash drive to another computer I never get all of the files to transfer. I get some of the .NEF and some of the .JPGs but not all

    I take a .NEF file and a .JPG file with every click. When I transfer the files using a flash drive to another computer I never get all of the files to transfer. I get some of the .NEF and some of the .JPGs but not all. How come?

    If you're exporting a project then you'll only get the images in that project. Also if any of the masters are referenced then you won't get those masters unless you check Consolidate masters into exported library
    It might be best if you started from the beginning and explained what it is your are trying to do and how you're going about doing it. Also a description of you're hardware/software setup would be helpful.

  • HT5030 whem installing itunes i get this message "this installation package could not be opened. Verifiy that the package exists and that you can access it, or contact the application vendor to verify that this is a valid windows installer package"

    whem installing itunes on my mums new computer which is windows 7 i get this message everytime "this installation package could not be opened. Verifiy that the package exists and that you can access it, or contact the application vendor to verify that this is a valid windows installer package"

    Let's check your Windows system.
    1.  Have you done all the important windows updates and service Packs on your system.  If not do it now.  START button, type in Windows Update and ENTER.  Select 'CHECK FOR UPDATES'
    2.  Let's check your Windows system files for possible file corruption
    SCAN and repair possible Windows system file corruption:
    Go to command prompt (START/ALL PROGRAMS/ACCESSORIES right mouse click "command prompt" and choose "Run as Administrator"
    type in
    sfc /scannow
    let Windows fix any system files that need to be repaired.
    Restart the computer if it did actually repair any files.
    3.  Check your system for possible Malware.  But you have to do it in WIndows Safe Mode.
    Start your computer in "Safe mode with networking", go to this link download a free version of Malwarebyte.
    http://www.malwarebytes.org/products/malwarebytes_free
    Install and perform update immediately, then do a full SCAN. Remove malware if it indeed finds any. Restart computer to regular windows to let Malwarebyte complete the removal.
    To start your computer in safe mode
    Press and hold the F8 key as your computer starts. You need to press F8 before the Windows logo appears. If the Windows logo appears, you'll need to try again by waiting until the Windows logon prompt appears, and then shutting down and restarting your computer.
    On the Advanced Boot Options screen, use the arrow keys to highlight the "safe mode with networking" option, and then press Enter. Log on to your computer with a user account that has administrator rights.
    When your computer is in safe mode, you'll see the words Safe Mode in the corners of your screen. To exit safe mode, restart your computer and let Windows start normally.

  • The Em Key is not configured properly or is corrupted in the file system and doe s not exist in the Management Repository.

    I'm getting this error and is there any way to resolve this without re-creating the service/s again, etc. Just curious if there are any suggestions/steps I may have missed, if not, I'll drop and recreate the services again
    Anyway, I have a backup of the emkey.ora and put it in the sysman/config directory, but still doesn't work... please see below...
    C:\Documents and Settings\abigail>emctl status emkey
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    Please enter repository password:
    The Em Key is not configured properly or is corrupted in the file system and doe
    s not exist in the Management Repository. To correct the problem:
    1) Copy the emkey.ora file from another OMS or backup machine to the OH/sysman/c
    onfig directory.
    2) Configure the emkey.ora file by running "emctl config emkey -emkeyfile <emkey
    .ora file location>".
    C:\Documents and Settings\abigail>emctl config emkey -emkeyfile E:\app\abigail\p
    roduct\11.2.0\dbhome_1\sysman\config
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    Please enter repository password:
    The Em Key is already configured. To override the current configuration, run "em
    ctl config  emkey <options> -force".
    C:\Documents and Settings\abigail>emctl config emkey -emkeyfile E:\app\abigail\p
    roduct\11.2.0\dbhome_1\sysman\config -force -sysman_pwd ********
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    The Em Key could not be configured. Unable to access file E:\app\abigail\product
    \11.2.0\dbhome_1\sysman\config.
    C:\Documents and Settings\abigail>emctl secure dbconsole -sysman_pwd ********
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    http://ABIGAIL:5501/em/console/aboutApplication
    DBCONSOLE already stopped...   Done.
    Agent is already stopped...   Done.
    Securing dbconsole...   Started.
    Please enter repository schema password:
    Securing dbconsole...   Failed.
    EMKey is misconfigured.

    Sorry but I'll have to ignore your suggestion, and don't worry about how I spend my time
    AND OHMYGODD IT WORKSS!!! For future reference, this is how I solved it based on my searches, actually based on one particular search:
    http://franjv.blogspot.com/2013/08/emkey-problems-in-oracle-rac-11gr2.html
    Thank youuu whoever wrote that and... is it the same "Fran" who helped me the last time?!? Coincidence??
    ANyway, thank youuuu

  • I am trying to download iTunes to my Sony PC,  but "This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer Package."

    mI am trying to download iTunes to my Sony PC, but I keep getting the following error after initial download attempt:
    "This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer Package."
    I have Windows 7 Home Premium, Service Pack 1.
    Any help is greatly appreciated.

    Hi gump68,
    Thanks for visiting Apple Support Communities.
    You may find the steps in this article helpful if iTunes is not installing on your PC:
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    All the best,
    Jeremy

  • Dialog prompt and check if file exists, and use the result of dialog

    I have this working script and I want to change the way it behaves.
    I want a dialog to come up, Do you want to skip or replace existing files.
    Then the result  of the dialog to be used in the reast of the script.
    I've added it in the script where I need to use it. in noce big letters, hopefully its not a big job.
    Many thanks
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
              set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
              if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                        set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                        set FolderEndName to last text item of folderName
                        set brandName to first text item of folderName
                        set my text item delimiters to "_PSD"
                        set weekNumber to first text item of FolderEndName
                        set my text item delimiters to oldTID
                        set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
      --set up names to destination folders and create locally based on brand name and week number
                        set this_local_folder to "Images:2012-2013"
                        set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                        set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                        set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                        set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                        set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                        set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                        set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                        set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                        set website_images to "GEN:Website_Images:"
      --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                        set this_ftp_folder to "pulse:"
                        set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                        set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                        set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                        set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
      --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
      --use the result for the if file exists?
                        display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
      --taking the folder identify which process it must follow.
                        if brandName is equal to "BH" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
      --    B H   Folder Photoshop Process
      --if thefile exists in the folder localBrandFolder_PSD then do the result of dialog.
      --"Skip" the file and move on to next
      --If "replace" continue the rest of the script.
                                            tell application "Adobe Photoshop CS5.1"
      -- I remove the command activate, Photoshop stay in background
                                                      set ruler units of settings to pixel units
                                                      try
      open (alias thefile) showing dialogs never
                                                                set origName to name of current document
                                                                set myOptions to {class:JPEG save options, quality:12}
                                                                set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                tell current document
      --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                          if (quick mask mode) then delete channel ¬
                                                                                    "Quick Mask"
      --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                          if (exists layer "Original Layer") then ¬
                                                                                    tell layer "Original Layer" to set name to "Original Image"
      save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                          (delete layer "Original Image") flatten
      resize image resolution 300 resample method none
      --sharpen image
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
      --get file path, return path of the JPEG file, work with (without copying)
      -- (with copying) : it return path of PSD file
                                                                          set newFile to file path --( return path of type alias )
      -- duplicate file using the Finder  -->on duplicateFile(..)
                                                                          my duplicateFile(newFile, {ftpBrandFolder_High_Res})
      --Prepare for Low RES by resetting image history
                                                                          set current history state to history state 3
                                                                          flatten
                                                                          resize image width 1348
      resize image resolution 300 resample method none
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      --add save to lowResFolder with same options
      save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                                          set newFile to file path
                                                                          set newFile2 to newFile as string -- for testing end of name
                                                                          if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                                          else
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                                          end if
      close saving no
                                                                end tell
                                                      on error
                                                                set noError to false
                                                                my myLogs(thefile) -- write path to log file in Desktop
                                                                try
      close saving no --if exists, close current document
                                                                end try
                                                      end try
                                            end tell
                                  end repeat
      --End BH
    -- else if and the rest of the script.....
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
              try
                        do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
              end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
              tell application "Finder" to repeat with folderPath in foldersPath
                        with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
      duplicate tFile to folder folderPath with replacing
                        end timeout
              end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
              tell application "Finder" to tell folder folderPath
                        if not (exists folder tName) then
                                  return (make new folder at it with properties {name:tName}) as string
                        else
                                  return (folder tName) as string
                        end if
              end tell
    end getFolderPath
    tell application "Finder"
              open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

    Hi,
    I think that's what you want.
    I put the dialog in the beginning, so it does not appear to each folder, otherwise put it in the loop as it was originally.
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
          property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
    --use the result for the if file exists?
    display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
    set skipFiles to (button returned of the result) is "Skip (Faster)"
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
          set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
          if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                set FolderEndName to last text item of folderName
                set brandName to first text item of folderName
                set my text item delimiters to "_PSD"
                set weekNumber to first text item of FolderEndName
                set my text item delimiters to oldTID
                set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
                --set up names to destination folders and create locally based on brand name and week number
                set this_local_folder to "Images:2012-2013"
                set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                set website_images to "GEN:Website_Images:"
                --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                set this_ftp_folder to "pulse:"
                set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
                --taking the folder identify which process it must follow.
                if brandName is equal to "BH" then
                      try
                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                      on error
                            set o's theseNames to {} -- no psd files or "8BPS"
                      end try
                      set numOfNames to (count o's theseNames)
                      repeat with j from 1 to numOfNames
                            set thefile to theFolder & ":" & (item j of o's theseNames)
                            --    B H   Folder Photoshop Process
                            tell application "Finder" to set b to exists file (localBrandFolder_PSD & item j of o's theseNames)
                            if b and not skipFiles then -- file exists and "replace" (continue the rest of the script).
                                  tell application "Adobe Photoshop CS5.1"
                                        -- I remove the command activate, Photoshop stay in background
                                        set ruler units of settings to pixel units
                                        try
                                              open (alias thefile) showing dialogs never
                                              set origName to name of current document
                                              set myOptions to {class:JPEG save options, quality:12}
                                              set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                              tell current document
                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                    if (quick mask mode) then delete channel ¬
                                                          "Quick Mask"
                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                    if (exists layer "Original Layer") then ¬
                                                          tell layer "Original Layer" to set name to "Original Image"
                                                    save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                    (delete layer "Original Image") flatten
                                                    resize image resolution 300 resample method none
                                                    --sharpen image
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                                                    --get file path, return path of the JPEG file, work with (without copying)
                                                    -- (with copying) : it return path of PSD file
                                                    set newFile to file path --( return path of type alias )
                                                    -- duplicate file using the Finder  -->on duplicateFile(..)
                                                    my duplicateFile(newFile, {ftpBrandFolder_High_Res})
                                                    --Prepare for Low RES by resetting image history
                                                    set current history state to history state 3
                                                    flatten
                                                    resize image width 1348
                                                    resize image resolution 300 resample method none
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    --add save to lowResFolder with same options
                                                    save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                    set newFile to file path
                                                    set newFile2 to newFile as string -- for testing end of name
                                                    if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                    else
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                    end if
                                                    close saving no
                                              end tell
                                        on error
                                              set noError to false
                                              my myLogs(thefile) -- write path to log file in Desktop
                                              try
                                                    close saving no --if exists, close current document
                                              end try
                                        end try
                                  end tell
                            end if -- else "Skip" the file and move on to next
                      end repeat
                      --End BH
                end if
          end if
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
          try
                do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
          end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
          tell application "Finder" to repeat with folderPath in foldersPath
                with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
                      duplicate tFile to folder folderPath with replacing
                end timeout
          end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
          tell application "Finder" to tell folder folderPath
                if not (exists folder tName) then
                      return (make new folder at it with properties {name:tName}) as string
                else
                      return (folder tName) as string
                end if
          end tell
    end getFolderPath
    tell application "Finder"
          open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

  • I have a few hundred duplicates in my iPhoto library, but the file sizes are different.  So one is 1.3mb and one is 567kb.  I want to delete the smaller ones, but short of comparing each duplicate, is there a way to do this?

    I have a few hundred duplicates in my iPhoto library, but the file sizes are different.  So one is 1.3mb and one is 567kb.  I want to delete the smaller ones, but short of comparing each duplicate, is there a way to do this?  I've been looking at Duplicate Annhilator but I don't think it can do it.
    Thanks!

    I just ran a test with iPhoto Library Manager, Duplicate Annihilator, iPhoto Duplicate Cleaner, Duplifinder and Photodedupo.  I imported a folder of 5 photos into a test library 3 times, allowing iPhoto to import duplicates.  I then ran the 5 photos thru resizer to reduce their jpeg compression but all other aspects of the file the same.
    None of the duplicate removal apps found set that was reduced in the file resizer. That's probably due to the fact that the file creation date was being used as a criteria and the resized photo would have a different file creation date even though the Image Capture date was the same.
    They all found the 3 regular duplicates and some of them would mark two and leave the 3rd unmarked.  iPhoto Duplicate Cleaner can sort the found duplicates by file size but if the file was edited to get the reduced file size it might not be found as it would have a different file creation/modification date. 
    iPhoto Library Manage was able to find all duplicates and mark them as such if the file names were the same the the filename option was selected.  Otherwise it also missed the modified, resized version.  It allowed one to select the one photo to save before going to work on the library.
    So if a photo has been reduced in image quality or pixel size it will not be considered a duplicate.
    OT

  • I am having a problem with my cs6 running very slow and when i save i am getting an error message that says, "This document is bigger than 2 gb (the file may not be read correctly by some TIFF viewers.) please help

    I am having a problem with my cs6 running very slow and when i save i am getting an error message that says, "This document is bigger than 2 gb (the file may not be read correctly by some TIFF viewers.) please help

    wen6275,
    It looks like you're actually using a camera or phone to take a photo of your monitor.
    That's not what is commonly known as a "screen shot". 
    It looks like you're on a Mac.  Hitting Command+Shift+3 places a capture of the contents of your entire monitor on your Desktop; hitting Command+Shift+4 will give you a cross-hairs cursor for you to select just the portion you want to capture.
    I'm mentioning this because I fear I'm not construing your original post correctly when you type "I am working with a large files [sic], currently it has 149 layers, all of which are high resolution photographs", so I'm wondering if there's some similar use of your own idiosyncratic nomenclature in your description of your troublesome file.
    Perhaps I'm just having a major senior moment myself, but I'm utterly unable to imagine such a file.  Would you mind elaborating?

Maybe you are looking for

  • Installing Adobe Photoshop CS3 on Leopard (headaches really...)

    Hi, I'm a Tiger user and i have another Mac that runs Leopard. I have Photoshop CS3 on a Disc and used in to install on my mac with Tiger, then when i try with the mac that runs Leopard i run into some issues. One Error Message states : "The applicat

  • My iPod Touch 2nd Gen is becoming useless.

    Many of the apps I paid for are crashing and the new apps won't work (iOS). I have a 286PC that still runs the programs I paid in the 1990s  why can't Apple products do the same?  I understand that I can't expect a iPod 2nd gen to run the new apps, b

  • Trading partner in profit center

    Dear Experts, Could anyone please let me know from where system will update trading partner details in profit center document during vendor Invoice? Regards babu

  • How it can be achieved ?

    Hi, I am having two servers one at london another in new york. On London server I can not do any changes in database while in new york server I can do any changes and I want to replicate a data of a single table london server to new york server. Supp

  • Jpl problems with the lombard please help........#2 corrected

    It takes 1+1 starts (the last time) or 111 before and 11+1+1+11 another. But it will start up and it run well in 10.4.8 sometimes it crash (lately since the problem start never before) but other wise runs good. I have looking into your other similar