WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
Page Index Toggle Pages: 1
Move a file & rename to static name (Read 58 times)
Brian M
YaBB Newbies

Posts: 1
Move a file & rename to static name
Jan 23rd, 2018 at 2:52pm
I have a task where I would like to detect a new file in directory and move it, rename it and overwrite the currently folder. This will only happen with one file, once a day. Like this:

/archive -- files gets dropped off here (ex 44558848302.csv)
detect and move to /load folder -- file gets renamed to Load.csv (overwrite current Load.csv that is there from day before).

Having trouble wrapping my head around getting this done.

Back to top
IP Logged
YaBB Administrator

Posts: 2260
The Netherlands
Re: Move a file & rename to static name
Reply #1 - Jan 23rd, 2018 at 4:40pm
Hello Brian,

Here is what you should do:
- Use "Copy Files" -
- Set the option use {dynamic naming} - when using this you do not set a destination folder but a destination file name for the file
- use C:\Load\load.csv as the "dynamic name"
at the bottom you can set an option so the file is not copied (original is kept) but moved.

Should work fine.
Back to top

Gert Rijs - gert (at) gdpsoftware (dot) com
End Alzheimer's:
WWW WWW GdPSoftware  
IP Logged
Page Index Toggle Pages: 1