DLMatthews
DLMatthews

Reputation: 11

InotifyWait changing file name to .outputstream-xxxx

I have a bash shell script using inotifywait to capture files added to a specific Dropbox folder, running a process and saving the file to another Dropbox folder. I'm running PopOS 22.04.

For some reason, inotifywait is now saying $filename is .goutputfile-xxxx and not the actual file name. In earlier testing of this process, it did not do this.

I have found a forum page about commenting out set locking in nanorc config file, but this did nothing.

Below is the opening code to the bash shell script:

#!/bin/bash

#set time and date variables

TIMENOW="$(date +"%T")"
DATENOW="$(date +"%m-%d-%Y")"

#launch the inotifywait utility formatting output to just the file name and piping it into while function to process
#file is saved to Dropbox folder from the first part of a Zapier process

inotifywait -m -e create --format %f /home/dave/Dropbox/Inbound |
while read -r filename event; do

Please let me know what config file I need to edit or code I need to use to force inotifywait to use the actual file name and not the .goutputstream-xxxx name.

I tried editing the nanorc config file by commenting out set locking option per another forum post. This did nothing.

I need some way of capturing the actual file name, even if it is in a separate variable.

Upvotes: 1

Views: 87

Answers (0)

Related Questions