Questions tagged [filelock]

File locks are locks held by an application, preventing interference from other processes. Locks may be advisory (may be ignored by others), or mandatory, enforced by the operating system, depending on implementation.

File locks are locks held by an application, preventing interference from other processes. Locks may be advisory (may be ignored by others), or mandatory, enforced by the operating system, depending on implementation.

190 questions
1
vote
0 answers

How can i connect Microsoft Frontpage 2003 to CQ5 Repository via WebDav?

i have a little problem. I need to connect Microsoft Frontpage 2003 to CQ5 Repository via WebDav keeping the functions of competitive access (check-in, check-out, file lock). Someone have any idea?
1
vote
1 answer

How to check if file opened?

I wrote program and need my own file watcher (loop that checks if file can be opened). Something like this: while (loadedFiles.Count > 0 || isNeedReRead) { Thread.Sleep(1000); if (isNeedReRead) ReadFromRegistry(); foreach (var…
Maksym
  • 244
  • 1
  • 2
  • 18
1
vote
0 answers

Lock a file open through FTP?

I'd like to lock files that are open through FTP, so once a file is being edited (on a mounted FTP folder in OSX) no one else can: - save it (necessary) - open it (optional) Does anyone have any tips on how to accomplish this? I understand it might…
martinedwards
  • 5,577
  • 1
  • 33
  • 35
1
vote
1 answer

limit the number of children and descendants processes

I have to use fork() recursively, but limit the number of forked processes (including children and descendants) to (for example) 100. Considering this code snippet: void recursive(int n) { for(int i=0; i
Lai Yu-Hsuan
  • 27,509
  • 28
  • 97
  • 164
1
vote
1 answer

Delete files which are not locked (in use)

I'm trying to delete all files (not folders) in %TEMP% which are older than 30 days. The problem is that some files are in use by a program so they can not be deleted. I tried to solve the problem as follow: function IsFileLocked($filePath){ …
John Smithv1
  • 673
  • 5
  • 14
  • 33
0
votes
1 answer

Locking `properties` file in java

I read this post. Can anybody tell me if the java.nio.FileLock.lock() works well with java.util.Properties class. Question: If I put the lock on the properties file what I read, does this lock the file for other concurrent locking? The code Will…
artaxerxe
  • 6,281
  • 21
  • 68
  • 106
0
votes
5 answers

Need help opening printer spool shadow file (.SHD) that is locked

I'm interested in some information inside a shadow file (.shd) located inside the windows print spooling directory "C:\Windows\System32\spool\PRINTERS". Every time a print job is started, a spool file (.spl) and a shadow file (.shd) are created in…
Ultratrunks
  • 2,464
  • 5
  • 28
  • 48
0
votes
0 answers

Do I need FileLock to read a file that is being written by other batch of processes using file-locking?

I have a bunch of processes accessing and modifying a csv file from Python at the same time (safely doing so with FileLock). I access the file using the Pandas package. I would like to launch another batch of processes which are going to access this…
Miguel
  • 96
  • 8
0
votes
0 answers

How to restore locked files to unlocked status (Windows 11 Home)

I have done a stupid thing and need help getting bailed out. I installed a file/folder lock app "EaseUS LockMyFile" (Windows 11 Home). I locked a couple of folders but wasn't happy with the app so I uninstalled it. But, I forgot to first unlock the…
clg
  • 25
  • 4
0
votes
0 answers

How to Release File-Lock on File Created by Shell in VBA?

This command generates an output file: Update: See new command Shell "cmd /c fc file1 file2 > result.txt" i initially didn't use cmd /c at the front of the command: Shell "fc file1 file2 > result.txt" That failed to generated the expected…
johny why
  • 2,047
  • 7
  • 27
  • 52
0
votes
1 answer

How to integrate single python file (filelock) to pyinstaller with specfile?

I have an application that I package with pyinstaller to windows package. I wanted to use the filelock.py to secure file writes. That file comes as a single .py file instead of a packages and that requires apparently a slightly different approach to…
Soerendip
  • 7,684
  • 15
  • 61
  • 128
0
votes
1 answer

Git commit while parallel process still has handle on file

I am using Git in an automated process to commit files to a repository. In one use-case a script is writing a file to the worktree, which is eventually picked up by the reoccurring 'commit' command. I noticed that Git commits a blank file to the…
Daniel Stephens
  • 2,371
  • 8
  • 34
  • 86
0
votes
3 answers

Unable to read from newly locked file

So I try to locked the file to read it, but I got IOException, any idea why? public static void main(String[] args){ File file = new File("C:\\dev\\harry\\data.txt"); FileReader fileReader = null; BufferedReader bufferedReader = null; …
Thang Pham
  • 38,125
  • 75
  • 201
  • 285
0
votes
1 answer

FileLock in Java doesn't work in Docker mount volume

In my situation, some web configuration files are shared through mount folder in Docker. In same cases we want to modify these files concurrently. That's why I want to use lock to make sure file is being modified once at the same time. But I found…
Xiaokun
  • 814
  • 2
  • 10
  • 26
0
votes
0 answers

MultiResourceItemReader leaving last file read locked, therefore can't move when done processing

Ideas on why the MultiResourceItemReader is leaving the last file locked and I cannot move it with the Move Tasklet? The moves completes all the other files, but the last one read. IO Exception has: java.nio.file.FileSystemException:…
wynnyrd
  • 1
  • 2