in reply to How to move/copy a file without overwriting an existing file
Part of the solution, if there may be multiple instances of the same script running, may be to maintain a lock file that mediates allocation of file names.
Possibly store the name and a next number for each used file. The atomic access to the lock file then adds a new name or increments the count on an existing name and in the process generates the name to be used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to move/copy a file without overwriting an existing file
by bart (Canon) on Mar 31, 2006 at 06:50 UTC |