78
Views
4
Comments
Solved
[FileSystem] Overwrite file in directory
Question
filesystem
Service icon
Forge asset by João Portela
Application Type
Service

I would like to have FileSystem overwrite the file if it already exists vs writing a new file with _1 appended.  Is there an option that would make this happen easily?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Josh,

What action do you use? File_Copy, File_Move, one of the File_Writes?

UserImage.jpg
Josh Herron
Solution

I am using File_WriteBinary.  It was my mistake though, the file is being overwritten as expected.  I just had a bug where I update the metadata table which stores the network path and file info so I thought it wasn't.

Sorry about that, and thanks!

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

No problem, I'm glad you found the bug :).

UserImage.jpg
Josh Herron
Solution

I am using File_WriteBinary.  It was my mistake though, the file is being overwritten as expected.  I just had a bug where I update the metadata table which stores the network path and file info so I thought it wasn't.

Sorry about that, and thanks!

UserImage.jpg
Alexandre Yip

Hi Josh Herron,

Prior copying the file, you can add logic to verify if the file exists, if so delete the file. 

Hope that it helps you 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Hi Josh,

What action do you use? File_Copy, File_Move, one of the File_Writes?

UserImage.jpg
Josh Herron
Solution

I am using File_WriteBinary.  It was my mistake though, the file is being overwritten as expected.  I just had a bug where I update the metadata table which stores the network path and file info so I thought it wasn't.

Sorry about that, and thanks!

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

No problem, I'm glad you found the bug :).

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.