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
Create a small dummy file with same name as source (Read 916 times)
YaBB Newbies

Posts: 10
Create a small dummy file with same name as source
Jul 28th, 2015 at 12:35am
What I would like to do is:
- monitor a directory for new files
- when a new file is detected, create a new file with the same name (does not need meaningful content, could have a single character in it.)
- put that file somewhere else
- delete original

I am dealing with large video files and I need to get the filename to place in a different directory.  I can do that today, but need to send the entire original ( like 400MB each) to the other location for the other process to get the filename.  I'd like to not have to transfer that large file when all I need to pass on is a small file with the same name.  Is that possible?


Jim P
Back to top
IP Logged
YaBB Administrator

Posts: 2260
The Netherlands
Re: Create a small dummy file with same name as source
Reply #1 - Jul 28th, 2015 at 10:17am
Hello Jim,

Use the run-a-batch file task and let it trigger the following script:
echo hello > "C:\SomeOtherDir\%WD_FILE_N%"

%WD_FILE_N% is a variable that is replaced by the detected file name, %WD_FILE% with the full name including the path. See
Back to top
« Last Edit: Jul 30th, 2015 at 8:07am by Gert »  

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