Scratch files in the 'run directory'

Hi!
This is probably a set-up problem (in which case I would be very interested to know what I should tweak...), but it seems to me that scratch files appear in the working directory (and would not always be cleaned-up in some not easily reproducible crashes). Is it possible to put them out of sight? ($TMPDIR come to mind for example).
Thanks!
Philippe
PS: this happens with 'Sun Fortran 95 8.3 Linux_i386 Build35_2 2006/12/04'
PPS: a small example:
      PROGRAM Scratch
      IMPLICIT NONE
      CALL List_Tmp
      OPEN ( UNIT = 666, FORM = "FORMATTED", STATUS = "SCRATCH",       &
     &                                            ACTION = "READWRITE" )
      WRITE ( UNIT = 666, FMT = "(A)" ) "Hello world!"
      CALL List_Tmp
      CALL Cat_Tmp
      CLOSE ( UNIT = 666 )
      CALL List_Tmp
      CONTAINS
      SUBROUTINE List_Tmp
      CALL SYSTEM ( "ls -ltr tmp.F_*" )
      END SUBROUTINE List_Tmp
      SUBROUTINE Cat_Tmp
      CALL SYSTEM ( "cat tmp.F_*" )
      END SUBROUTINE Cat_Tmp
      END PROGRAM Scratch
!(this is a bit contrived, but shows my point).
with 'f95 -o Test Check_Scratch.f90 ; ./Test' shows that during run time a "tmp.F_*" file is created (it gets nicely cleaned-up at the end in this case, though).

Hi!
This is probably a set-up problem (in which case I
would be very interested to know what I should
tweak...), but it seems to me that scratch files
appear in the working directory (and would notalways
be cleaned-up in some not easily reproducible
crashes). Is it possible to put them out of sight?
($TMPDIR come to mind for example).
I fixed the bug yesterday. With my new version of the
Fortran run-time libraries, the environment variable
TMPDIR can be used to specify the directory in which
scratch files are to be created. It was harder than I
thought it would be to produce code that worked on
both Solaris and Linux. The Solaris code depended
on a function that did not work the same way in Linux.
Avoiding use of that function required rethinking the
way the names of the scratch files are generated.
Bob Corbett

Similar Messages

  • Unable to start Photoshop CS6 - could not open a scratch file because the file is locked (Windows)

    When I first installed Adobe Photoshop CS6 I was unable to run Photoshop or Bridge CS6.  Photoshop would give me an error about "could not open a scratch file because the file is locked.  If I ran either of these programs as an administrator they would run without issue, this led me to believe that there was a permission issue somewhere.  After some digging I found out the both Bridge and Photoshop try to create a temp file (similiar to Photoshop Temp2777223910092) on the c:\ drive of the computer.  In my case the user that I was logged in with did not have access to write to the root of the C:\ drive.  Note that you run the program as the administrator and change the scratch disk location as that changes the preference for the administrator user and not the user that you are currently logged in as.
    To get around this issue I first had to give the user that I was logged on with write permissions to the root of the C:\ drive.  Next try and run Photoshop, you will get an error another error about the scratch disk and about and invalid or missing setting file.  To correct this you need to have run Photoshop as an administrator, next you can go to Users\Admin\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings and copy Adobe Photoshop CS6 Prefs and/or Adobe Photoshop X64 CS6 Prefs to Users\<your logged in username>\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings.
    Photoshop and bridge should now start up with no issues.
    I hope that this can help others out there as this caused me a great deal of frustration when upgrading to CS6.

    station_two wrote:
    OK, here comes the explanation of what the scratch disk does and why it's optimal to have it on a physically separate internal drive (not partition!) other than your boot drive
    I probably shouldn't say anything since it could complicate this thread, but the rules of thumb can be different under special circumstances when SSD is involved.
    IF you have a LOT of empty space on your SSD-based system drive, then Photoshop can actually work great with it's scratch setting pointed at the system drive.  This is because a) SSD transfers are much faster than spinning hard drives and b) there's no seek time, so simultaneous transfers to/from scratch and swap files aren't devastating to performance, and you can see a net gain because of the increased I/O throughput over what's possible using a separate spinning drive for scratch.
    But if you don't have a huge amount of free space (hundreds of GB) on the system SSD, it's definitely better to use a separate drive, as station_two has said.
    Also, up to about a year or so ago, you had to try to severely limit write activity to your SSD drive, since you could actually wear them out by repeated high data write activity.  That's pretty much a non-issue now with the advent of things like the SandForce in-drive controller that does wear-leveling inside the drive.  Modern drives will last 10 years or more in normal typical use, without special consideration.
    As it turns out, making a RAID array of SSDs is a great way to boost performance across the board, have bunches of free space, and ensure even the heaviest usage doesn't shorten the drive life.  I have done so, creating a 2 TB system drive C: made from 4 SSDs and Photoshop's swap file (and pretty much everything else) pointed to C:.  This system flies, and I can barely tell when Photoshop and/or Windows "goes virtual" and starts using its scratch/swap files heavily.  I don't even notice Photoshop auto-saves.
    Sorry for the SSD diversion.
    Back on topic: 
    Pretty much everyone who's successfully using a computer - Mac and PC users alike - comes to realize after a while that the task of integrating things on their computers and making everything work falls on THEM, not the developers of applications like Adobe.  Some applications pose unique challenges, but to think you can just throw up your hands and try to make it someone else's problem when something goes wrong simply isn't a viable strategy.  Maybe that's how things should be, but it's not how it is.
    For those of you struggling to get Photoshop to run properly, bear in mind that it's on you to get things working.  It works for most folks.  It could be a configuration or setup choice you've made that may need revisiting, or some kind of restorative activity that you need to do, or even something very minor like clearing your Photoshop preferences, but it may well take your learning new things and doing things you didn't think you'd have to do to get back to where you can edit photos.  It's no one's problem but your own.
    So let us here on the forum help you - when we say to do something, try it.  We're not here to jerk you around; we're users just like you who have already found the ways to make things work, and we'd like to help you do the same.
    -Noel

  • Unable to start Photoshop CS 6 Beta - could not open a scratch file because the file is locked (win)

    The Program does nor start.
    I the the following error message:
    Gould not open a scratch file because the file is locked, you do not have necessary access perimssens, or another program is using the file. Use the "Properities" command In the WIndows Explorer to unlock the file.
    Which file shoud  I unlock?
    What means "unlock"?
    Adda

    "Hello, Adda. Most users can use it without problems. Did you set strict permissions on your machine?
    Also, is it a small SSD? you lose their speed benefit by not putting Photoshop's scratch file on it."
    Most power users are having big problems, We don't put scratch files on our SSDs because we know that this will run those into the ground. They are not intended for the pounding of constant read / write cycles. We also switch off indexing and any other constant cycling technology. Again, SSDs are best use for static files. They are, in fact, intended mainly for super fast launch, which is what they do so well. Obviously, if all you have is an SSD, then you have to live with the shortened life.
    I have my scratch files and my TEMP folder set to a huge and empty internal drive. I have my USERS folder hard linked to a different huge internal drive, where I also store MY DOCUMENTS. I have an even larger internal drive where I store MY PICTURES. This has worked flawlessly (and very fast) for CS5 and LR4 Beta 1. Only CS6 complains constantly.
    "Yes, I agree, but sometimes, what sounds and smells like a bug is not one, hence the troubleshooting we're trying to do, before QE tries to reproduce it."
    This one not may or may not be a bug. But since I own and run dozens of applications, and only CS6 is freaking out constantly, I would say that it is not normal behavior.

  • Unable To Execute Files In The Temporary Directory. Setup Aborted. Error 5: Access Is Denied.

    Hi Everyone,
    Whenever I install some new software in my new laptop I get this error:-
    Unable To Execute Files In The Temporary Directory. Setup Aborted. Error 5: Access Is Denied.
    I have tried synchronizing the clocks but it doesn't remove the problem.
    These softwares work on another laptop that i have, which also runs windows 7.
    Can someone please tell me the solution as this is extremely urgent.
    Thanks In Advance.
    -Michael

    In short:
    ============
    My permissions were all fine, so if anyone has trouble resolving the issue after sorting permissions then make sure you try fully disabling your anti-virus / anti-spyware / firewall applications, because that was the cause for me.
    In detail:
    ============
    Problem:
    Failed to install this application
    - http://www.ssware.com/cryptoobfuscator/download.htm
    - on Windows 8.1 x64
    - Get error message "Unable To Execute Files In The Temporary Directory. Setup Aborted. Error 5: Access Is Denied."
    First Candidate Solution
    The issue turns out to NOT be security rights on the Temp folder
    ESET Smart Security HIPS Advanced Memory Scanner is the cause
    http://kb.eset.com/esetkb/index?page=content&id=SOLN2908&actp=search&viewlocale=en_US&searchid=1392804914417
    Instead, I went and turned off all the ESS protections one by one and it turned out to be HIPS that is causing this false positive.
    In fact, it is the Advanced Memory Scanner option under HIPS that is causing the error, while the application in question is legit (using Inno Setup and presumably trying to write to the user temp folder, not sure whether just logs or to execute from there)
    Furthermore, Smart Security logs have no entries under HIPS even though I ticked "Log all blocked operations" under the HIPS "Advanced setup" - it was quite a journey to find out the cause :)
    Thank you. I have the same OS and installed ESET Smart Security as well. And it is resolved now.
    I just want to add, that by "Temporarily disable protection" and "Temporarily disable firewall", it doesn't work. You have to disable HIPS, as KristjanL said. 

  • [SOLVED] Files in the /tmp directory are being deleted

    Hi,
    I've been using Arch Linux for four weeks, but have now come across a problem which I can't fix after trying to search for a solution (and also checking to see if anyone also had the same problem). I would appreciate any help you can give.
    A few days ago the web browsers I use (chromium and opera) lost their profile settings, and I had to set the profiles. This kept happening and the indicator of the problem was that I use profile-sync-daemon for both web browsers, which uses the /tmp directory. I then started noticing that a file I created in /tmp disappeared which pointed me to the fact that something was cleaning up the /tmp directory (this seems to happen hourly).
    A quick search led me to systemd-tmpfiles and the /usr/lib/tmpfiles.d/tmp.conf file. I have not modified the file, and if I have read it correctly only files in the /tmp directory that are more than 10 days old are deleted. I boot every day, so no files should be deleted by systemd-tmpfiles (unless I've misunderstood tmpfiles.d).
    Here is the tmp.conf file anyway:
    $ cat /usr/lib/tmpfiles.d/tmp.conf
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    # See tmpfiles.d(5) for details
    # Clear tmp directories separately, to make them easier to override
    d /tmp 1777 root root 10d
    d /var/tmp 1777 root root 30d
    # Exclude namespace mountpoints created with PrivateTmp=yes
    x /tmp/systemd-private-*
    x /var/tmp/systemd-private-*
    X /tmp/systemd-private-*/tmp
    X /var/tmp/systemd-private-*/tmp
    The /etc/tmpfiles.d directory is empty, so /usr/lib/tmpfiles.d is the only location for the tmpfiles.d config files:
    $ ls /etc/tmpfiles.d/
    $
    Here is the list of packages I upgraded/installed for the last few days. systemd 207-3 seems the likeliest candidate, but I have not come across any reports about the problem I am having.
    [2013-09-17 19:30] [PACMAN] Running 'pacman -Syu'
    [2013-09-17 19:30] [PACMAN] synchronizing package lists
    [2013-09-17 19:30] [PACMAN] starting full system upgrade
    [2013-09-17 19:34] [PACMAN] upgraded bluez-utils (5.7-1 -> 5.8-1)
    [2013-09-17 19:34] [PACMAN] upgraded cogl (1.14.0-4 -> 1.14.0-5)
    [2013-09-17 19:34] [PACMAN] upgraded dbus (1.6.12-1 -> 1.6.14-1)
    [2013-09-17 19:34] [PACMAN] upgraded dialog (1.2_20130523-2 -> 1.2_20130902-1)
    [2013-09-17 19:34] [PACMAN] installed efivar (0.6-1)
    [2013-09-17 19:34] [PACMAN] upgraded efibootmgr (0.6.0-3 -> 0.6.0.138.1132342-1)
    [2013-09-17 19:34] [ALPM-SCRIPTLET] Generating locales...
    [2013-09-17 19:34] [ALPM-SCRIPTLET] en_GB.UTF-8... done
    [2013-09-17 19:34] [ALPM-SCRIPTLET] Generation complete.
    [2013-09-17 19:35] [PACMAN] upgraded glibc (2.18-3 -> 2.18-4)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-desktop (1:3.8.3-2 -> 1:3.8.4-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-color-manager (3.8.2-1 -> 3.8.3-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-settings-daemon (3.8.4-2 -> 3.8.5-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-control-center (3.8.4.1-2 -> 3.8.5-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-themes-standard (3.8.3-1 -> 3.8.4-1)
    [2013-09-17 19:35] [PACMAN] upgraded libpng (1.6.3-1 -> 1.6.5-1)
    [2013-09-17 19:35] [PACMAN] upgraded libusbx (1.0.16-2 -> 1.0.17-1)
    [2013-09-17 19:35] [PACMAN] upgraded linux-firmware (20130725-1 -> 20130903-1)
    [2013-09-17 19:35] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
    [2013-09-17 19:35] [ALPM-SCRIPTLET] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Starting build: 3.11.1-1-ARCH
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [base]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [udev]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [autodetect]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [modconf]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [block]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [fsck]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Generating module dependencies
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Image generation successful
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Starting build: 3.11.1-1-ARCH
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [base]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [udev]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [modconf]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [block]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: bfa
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: smsmdtv
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [filesystems]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [keyboard]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] -> Running build hook: [fsck]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Generating module dependencies
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> Image generation successful
    [2013-09-17 19:35] [PACMAN] upgraded linux (3.10.10-1 -> 3.11.1-1)
    [2013-09-17 19:35] [PACMAN] upgraded openssh (6.2p2-1 -> 6.3p1-1)
    [2013-09-17 19:35] [PACMAN] upgraded orc (0.4.17-1 -> 0.4.18-1)
    [2013-09-17 19:35] [ALPM-SCRIPTLET]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> The file /etc/sysctl.conf has been removed from this
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> package, as all its settings are now kernel defaults.
    [2013-09-17 19:35] [ALPM-SCRIPTLET]
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> If you had customized it, you need to rename it as
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> /etc/sysctl.d/99-sysctl.conf since from version 207 on
    [2013-09-17 19:35] [ALPM-SCRIPTLET] ==> systemd only applies settings from /etc/sysctl.d/* .
    [2013-09-17 19:35] [ALPM-SCRIPTLET]
    [2013-09-17 19:35] [PACMAN] upgraded procps-ng (3.3.8-2 -> 3.3.8-3)
    [2013-09-17 19:35] [PACMAN] upgraded raptor (2.0.9-2 -> 2.0.10-2)
    [2013-09-17 19:35] [PACMAN] upgraded xorg-xinput (1.6.0-1 -> 1.6.1-1)
    [2013-09-17 19:36] [PACMAN] Running 'pacman --color auto -U /tmp/yaourt-tmp-dsana/PKGDEST.u70/profile-sync-daemon-5.40.1-1-any.pkg.tar.xz'
    [2013-09-17 19:36] [PACMAN] upgraded profile-sync-daemon (5.40-1 -> 5.40.1-1)
    [2013-09-18 20:35] [PACMAN] Running 'pacman -Syu'
    [2013-09-18 20:35] [PACMAN] synchronizing package lists
    [2013-09-18 20:35] [PACMAN] starting full system upgrade
    [2013-09-18 20:35] [ALPM] warning: /etc/systemd/journald.conf installed as /etc/systemd/journald.conf.pacnew
    [2013-09-18 20:35] [ALPM-SCRIPTLET] ==> systemd 205 restructures the cgroup hierarchy and changes internal
    [2013-09-18 20:35] [ALPM-SCRIPTLET] protocols. You should reboot at your earliest convenience.
    [2013-09-18 20:35] [ALPM-SCRIPTLET] ==> The "timestamp" hook for mkinitcpio no longer exists. If you used
    [2013-09-18 20:35] [ALPM-SCRIPTLET] this hook, you must remove it from /etc/mkinitcpio.conf. A "systemd"
    [2013-09-18 20:35] [ALPM-SCRIPTLET] hook has been added which provides this functionality, and more.
    [2013-09-18 20:35] [PACMAN] upgraded systemd (204-3 -> 207-3)
    [2013-09-18 20:35] [PACMAN] upgraded systemd-sysvcompat (204-3 -> 207-3)
    [2013-09-18 20:35] [PACMAN] upgraded udisks2 (2.1.0-3 -> 2.1.1-1)
    [2013-09-19 20:46] [PACMAN] starting full system upgrade
    [2013-09-19 20:48] [PACMAN] Running 'pacman -Rns psd'
    [2013-09-19 20:48] [PACMAN] Running 'pacman -Rns profile-sync-daemon'
    [2013-09-19 20:48] [PACMAN] removed profile-sync-daemon (5.40.1-1)
    [2013-09-19 20:48] [PACMAN] removed rsync (3.0.9-6)
    [2013-09-19 20:49] [PACMAN] Running 'pacman -Rns chromium'
    [2013-09-19 20:49] [PACMAN] Running 'pacman -Syu'
    [2013-09-19 20:49] [PACMAN] synchronizing package lists
    [2013-09-19 20:49] [PACMAN] starting full system upgrade
    [2013-09-19 20:50] [PACMAN] upgraded chromium (29.0.1547.65-1 -> 29.0.1547.76-1)
    [2013-09-19 20:50] [PACMAN] upgraded xvidcore (1.3.2-1 -> 1.3.2-2)
    [2013-09-19 20:58] [PACMAN] Running 'pacman --color auto -U /tmp/yaourt-tmp-dsana/PKGDEST.ZDK/chromium-pepper-flash-stable-2:11.8.800.170-1-x86_64.pkg.tar.xz'
    [2013-09-19 20:58] [PACMAN] upgraded chromium-pepper-flash-stable (2:11.8.800.97-1 -> 2:11.8.800.170-1)
    EDIT: journalctl doesn't show me anything interesting, other than the fact that chromium complains when it realizes that its profile data has gone missing.
    Last edited by dsana123 (2013-09-21 16:02:48)

    I think I have found the problem.
    There was a gnome update earlier in the week. gnome-settings-daemon runs an hourly housekeeping job. I had set the "Automatically Purge Temporary Files" in the Privacy tab when setting up my laptop last month.
    gnome-settings-daemon has decided to delete files in the /tmp directory (I can trigger this by clicking "Purge Temporary files" which then deletes my files in the /tmp directory). This does not happen in the previous gnome-settings-daemon. Anyway, I'll mark the thread SOLVED if my file in the /tmp directory survives the hour!
    [2013-09-17 19:35] [PACMAN] upgraded gnome-desktop (1:3.8.3-2 -> 1:3.8.4-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-color-manager (3.8.2-1 -> 3.8.3-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-settings-daemon (3.8.4-2 -> 3.8.5-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-control-center (3.8.4.1-2 -> 3.8.5-1)
    [2013-09-17 19:35] [PACMAN] upgraded gnome-themes-standard (3.8.3-1 -> 3.8.4-1)

  • I want to Pick the Single file from The source Directory

    Hi,
       My Scenario is File to RFC .. I'm getting the files in the source Directory.. File names  are  SENDER_(TIMESTAP).XML .. but the problem is... When ever  Files  are available in the Source Directory  Immediately  XI was picking  all the files at a time.. But I want to   to Pick a single file at a time..
    for Making  this what we have to do..   After Processing the first file then only my Sender adapter should pick the next file...  (even though Multiple files are available in my Source Directory)
    Regards
    Jain

    Hi,
    the other option was use Adapter specific attributes in the Sender Communication channel..
    or
    while droping the files ask them to drop using time stamp in another directory  and an external validation is required .. and after validation push single file to Source directory using batch file..
    i.e use a batch file using run time operating system or make that batch file to run at OS level ..
    where the batch files needs to validate the time interval of the file and needs to push a single file to the source directory.. where from there we can directly pick a single file and process..
    regards,
    Kishore

  • I am trying to import developed images from LightRoom 5 in o Photoshop 6.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, you do not have necessary access permissions or another progra

    I am trying to import developed images from LightRoom 5 Photoshop 6 for further editing.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, or you do not have necessary access permissions or another program is using the file.  Use the 'Properties' command in the Windows Explorer to unlock the file. How do I fix this?  I would greatly appreciate it if you would respond with terms and procedures that a computer ignorant user, such as me, will understand.   Thanks.

    Have you tried restoring the Preferences yet?

  • How can i get also the files in the root directory and how can i for testing add items of IEnumerable FTPListDetail to List string ?

    What i get is only the directories and files that in other nodes. But i have also files on the root directory and i never
    get them. This is a screenshot of my program after i got the content of my ftp. I'm using treeView to display my ftp content:
    You can see two directories from the root but no files on the root it self. And in my ftp server host i have files in the root direcory.
    This is the method i'm using to get the directory listing:
    public IEnumerable<FTPListDetail> GetDirectoryListing(string rootUri)
    var CurrentRemoteDirectory = rootUri;
    var result = new StringBuilder();
    var request = GetWebRequest(WebRequestMethods.Ftp.ListDirectoryDetails, CurrentRemoteDirectory);
    using (var response = request.GetResponse())
    using (var reader = new StreamReader(response.GetResponseStream()))
    string line = reader.ReadLine();
    while (line != null)
    result.Append(line);
    result.Append("\n");
    line = reader.ReadLine();
    if (string.IsNullOrEmpty(result.ToString()))
    return new List<FTPListDetail>();
    result.Remove(result.ToString().LastIndexOf("\n"), 1);
    var results = result.ToString().Split('\n');
    string regex =
    @"^" + //# Start of line
    @"(?<dir>[\-ld])" + //# File size
    @"(?<permission>[\-rwx]{9})" + //# Whitespace \n
    @"\s+" + //# Whitespace \n
    @"(?<filecode>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<owner>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<group>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<size>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<month>\w{3})" + //# Month (3 letters) \n
    @"\s+" + //# Whitespace \n
    @"(?<day>\d{1,2})" + //# Day (1 or 2 digits) \n
    @"\s+" + //# Whitespace \n
    @"(?<timeyear>[\d:]{4,5})" + //# Time or year \n
    @"\s+" + //# Whitespace \n
    @"(?<filename>(.*))" + //# Filename \n
    @"$"; //# End of line
    var myresult = new List<FTPListDetail>();
    foreach (var parsed in results)
    var split = new Regex(regex)
    .Match(parsed);
    var dir = split.Groups["dir"].ToString();
    var permission = split.Groups["permission"].ToString();
    var filecode = split.Groups["filecode"].ToString();
    var owner = split.Groups["owner"].ToString();
    var group = split.Groups["group"].ToString();
    var filename = split.Groups["filename"].ToString();
    var size = split.Groups["size"].Length;
    myresult.Add(new FTPListDetail()
    Dir = dir,
    Filecode = filecode,
    Group = group,
    FullPath = CurrentRemoteDirectory + "/" + filename,
    Name = filename,
    Owner = owner,
    Permission = permission,
    return myresult;
    And then this method to loop over and listing :
    private int total_dirs;
    private int searched_until_now_dirs;
    private int max_percentage;
    private TreeNode directories_real_time;
    private string SummaryText;
    private TreeNode CreateDirectoryNode(string path, string name , int recursive_levl )
    var directoryNode = new TreeNode(name);
    var directoryListing = GetDirectoryListing(path);
    var directories = directoryListing.Where(d => d.IsDirectory);
    var files = directoryListing.Where(d => !d.IsDirectory);
    total_dirs += directories.Count<FTPListDetail>();
    searched_until_now_dirs++;
    int percentage = 0;
    foreach (var dir in directories)
    directoryNode.Nodes.Add(CreateDirectoryNode(dir.FullPath, dir.Name, recursive_levl+1));
    if (recursive_levl == 1)
    TreeNode temp_tn = (TreeNode)directoryNode.Clone();
    this.BeginInvoke(new MethodInvoker( delegate
    UpdateList(temp_tn);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    foreach (var file in files)
    TreeNode file_tree_node = new TreeNode(file.Name);
    file_tree_node.Tag = "file" ;
    directoryNode.Nodes.Add(file_tree_node);
    numberOfFiles.Add(file.FullPath);
    return directoryNode;
    Then updating the treeView:
    DateTime last_update;
    private void UpdateList(TreeNode tn_rt)
    TimeSpan ts = DateTime.Now - last_update;
    if (ts.TotalMilliseconds > 200)
    last_update = DateTime.Now;
    treeViewMS1.BeginUpdate();
    treeViewMS1.Nodes.Clear();
    treeViewMS1.Nodes.Add(tn_rt);
    ExpandToLevel(treeViewMS1.Nodes, 1);
    treeViewMS1.EndUpdate();
    And inside a backgroundworker do work how i'm using it:
    var root = Convert.ToString(e.Argument);
    var dirNode = CreateDirectoryNode(root, "root", 1);
    e.Result = dirNode;
    And last the FTPListDetail class:
    public class FTPListDetail
    public bool IsDirectory
    get
    return !string.IsNullOrWhiteSpace(Dir) && Dir.ToLower().Equals("d");
    internal string Dir { get; set; }
    public string Permission { get; set; }
    public string Filecode { get; set; }
    public string Owner { get; set; }
    public string Group { get; set; }
    public string Name { get; set; }
    public string FullPath { get; set; }
    Now the main problem is that when i list the files and directories and display them in the treeView it dosen't get/display
    the files in the root directory. Only in the sub nodes.
    I will see the files inside hello and stats but i need also to see the files in the root directory.
    1. How can i get and list/display the files of the root directory ?
    2. For the test i tried to add to a List<string> the items in var files to see if i get the root files at all.
       This is what i tried in the CreateDirectoryNode before it i added:
    private List<string> testfiles = new List<string>();
    Then after var files i did:
    testfiles.Add(files.ToList()
    But this is wrong. I just wanted to see in testfiles what items i'm getting in var files in the end of the process.
    Both var files and directoryListing are IEnumerable<FTPListDetail> type.
    The most important is to make the number 1 i mentioned and then to do number 2.

    Risa no.
    What i mean is this. This is a screenshot of my ftp server at my host(ipage.com).
    Now this is a screenshot of my program and you can see that in my program i have only the directories hello stats test but i don't have the files in the root: htaccess.config swp txt 1.txt 2.png....all this files i don't have it on my treeView.
    What i want it to be is that on my program on the treeView i will also display the files like in my ftp server.
    I see in my program only the directories and the files in the directories but i don't see the files on the root directory/node.
    I need it to be like in my ftp server i need to see in my program the htaccess 1.txt 2.png and so on.
    So what i wrote in my main question is that in the var files i see this files of the root directory i just don't know to add and display them in my treeView(my treeView is treeViewMS1).
    I know i checked in my program in the method CreateDirectoryNode i see in the first iteration of the recursive that var files contain this root files i just dont know how to add and display them in my treeView.
    On the next iterations when it does the recursive it's adding the directories hello stats test and the files in this directories but i need it to first add the root files.

  • I get this error upon launching PS5: "could not open a scratch file because the file is locked .."

    I get this error upon launching PS5: "could not open a scratch file because the file is locked or ou do not have the necessary access privileges. Use the 'properties' command in the Windows Explorer to unlock the file". The applicaiton will not launch.
    Supporting information - I recently changed the scratch disk from C drive to D drive (the back up/restore drive). The application wont launch so I cant change it back to the C drive.
    Questions:
    - How to I fix this .. from windows explorer how do I find "the file" that the error message refers to?
    - Other ways to fix this?
    Thanks Steve

    Hi there! Because the forum you originally posted in is for beginners trying to learn the basics of Photoshop, I moved your question to the Photoshop General Discussion forum, where you'll get more specialized help.
    To help others help you, please read through this article and provide any additional relevant details.

  • I am trying to import developed images from LightRoom 5 into Photoshop 6.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, you do not have necessary access permissions or another progra

    I am trying to import developed images from LightRoom 5 into Photoshop 6.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, you do not have necessary access permissions or another program is using the file.  Use the 'properties' command in the Windows Explorer to unlock the file'.  This has not happened before.  How do I change this?

    Could not open a scratch file because the file is locked or you do not have the necessary access privileges. (…) | Mylen…
    Mylenium

  • Photoshop won't start: Could not open a scratch file because the file is locked, you do not have necessary access permissions, or another program is using the file.

    Adobe Photoshop CS6 Extended
    "Could not open a scratch file because the file is locked, you do not have necessary access permissions, or another program is using the file."
    I've tried finding and checking and fixing permissions but no success.
    This happened from one day to the next. I think it has to do with the sn attached to the disk rather then the motherboard. I have the suite co-installed with Symphony 5.05. I've tried reinstalling.
    What's to b done? The rest of the Creative Suite 6 (AE, AI etc.) works fine.
    Anyone...?
    Loui

    Have you tried restoring the Preferences yet?

  • Can we load and unload the files in the run time?

    Can we load and unload the files in the run time?
    For example there are four files named "test1.h & test1.c" and another set "test2.h & test2.c" (I attached them as attachment to this post).
    test1.h contains code:
    int variable; //variable declared as integer
    test1.c contains code:
    variable = 1; //variable assigned a value
    test1.h contains code:
    char *variable; //variable declared as string
    test1.c contains code:
    variable = "EXAMPLE"; //variable assigned a string
    So here, in this case can I dynamically load / unload the first & second group of files so that the same variable name "variable" can be used both as integer and string? And if yes, how is that to be done?
    Solved!
    Go to Solution.
    Attachments:
    test.zip ‏1 KB

    What do you mean by "dynamically"?
    If you want to have a variable that either is an int or a char in the same program run, I'm afraid your only option is to define it as a variant and assign from time to time the proper data type in the variant according to some condition. Next, every time you access the variable you must firstly check which data type is stored in it, next access it in the proper way.
    If on the other hand your option or to have a run in which the variable is an int, next you stop the program and in a following run it is a char, you may have it by using some appropriade preprocessor clause:
    #ifdef  CHAR_TYPE
    #include "test1.h";        // variable defined as a char
    #else
    #include "test2.h";        // variable defined as int
    #endif
    Next, every time you want to access the variable you must proceed in the same vay:
    #ifdef  CHAR_TYPE
      variable = "string";
    #else
      variable = 1;
    #endif
    Does it worth the effort?
    Additionally, keep in mind that this "dynamical" approach can work only in the IDE, where you can properly #define your CHAR_TYPE or not depending on your wishes: when you compile the program, it will have only one #include depending on the definition of the macro.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Deleting all files in the Unix directory

    I was trying to create a DB in Unix. I had to remove all the files in the udump directory and I saw that there were files in thousands. I was trying to find a command to remove all of them to make the directory empty, so that I could create the udump file for Database creation. However, I couldn't find a command to remove all of them at once. I tried to google but evey website speaks about just these commands..
    rm filename
    or
    rm -r * directory_name
    This doesn't solve my problem as these commands are deleting one file at a time and not all the files at once within the directory. Can someone tell me the solution?

    Hi,
    First go to the directory where you want to delete all the files and folders. then
    rm -fr directory_name
    rm -r is not neccessary that it will delete the files and folder.
    thx
    pradeep

  • 10.1.3.4 - ESB FTP adapter not processing the files in the input directory

    I created a process that reads from a logical inputDir. I migrated the ESB service to another box and created the same adapter connection etc. however nothing really happens in this new environment. In the opmn.log i see the following statements and no other info.
    2008-12-16 14:03:41,994> <INFO> <collaxa> <ServerManager::loadProcesses> Done loading processes for all domains
    <AdapterFramework::Inbound> Instantiating inbound part of Adapter Framework instance: OraESB
    <AdapterFramework::Inbound> Adapter Framework instance: OraESB - endpointActivation for portType=Get_ptt, operation=Get
    <AdapterFramework::Inbound> Creating new instance of Resource Adapter oracle.tip.adapter.ftp.FTPResourceAdapter
    <AdapterFramework::Inbound> Adapter Framework instance: OraESB - starting Resource Adapter oracle.tip.adapter.ftp.FTPResourceAdapter
    <FTP Adapter::Inbound> File/FTP Adapter started successfully.
    <FTP Adapter::Inbound> ENDPOINT ACTIVATION CALLED IN FTP ADAPTER
    <AdapterFramework::Inbound> Adapter Framework instance: OraESB - successfully completed endpointActivation for portType=Get_ptt, operation=Get
    <FTP Adapter::Inbound> Connection Created
    <FTP Adapter::Inbound> Connection Created
    The last message "Connection Created" keeps repeating, but no processing occurs. I tried increasing all the loggers to finest. but still nothing happens.
    any idea how to troubleshoot this ? the only difference in the environment is that the new environment has 10.1.3.4 MLR2 and the first one is just plain 10.1.3.4

    Make sure that you modified the oc4j-ra.xml file in the FtpAdapter directory and have put the correct hostname and username and password. The directory structure looks like this //some-directory/oc4j_soa/application-deployments/default/FtpAdapter/oc4j-ra.xml.

  • Photoshop wont open get error could not open a scratch file because the disk is not available

    Had to clone my hard drive to another drive on my computer.
    I have been receiving a message "Could not open a scratch file because the disk is not available"  I have tried UN-installing and re-installing...still the same message.
    Does anyone have any idea how to fix this?
    Thanks!

    What do you have here.
    If that does not help, reset your prefs
    Hold fingers over Shift Option Command (or similar on Windows) then boot Photoshop and as fast as you can depress the 3 keys.

Maybe you are looking for