WatchDirectory Forum
watchDirectory forums >> Plugins >> BAT File question

Message started by hbreuer on Feb 25th, 2006 at 9:50pm

Title: BAT File question
Post by hbreuer on Feb 25th, 2006 at 9:50pm
Hallo Gert,

sorry being a pain in the neck... but my knowledge of DOS BAT files is nearly 0...

You gave me the key to add some text in the file I monitored with your application. Only one thing more: I add the text before the file. And its always the same text, so I have created a .txt file including it.

The problem is that the result file (merging both messages) gets the name from the first file (my .txt file), so it does not work.

Is it anyway to tell the BAT file I want to merge those files, but use for the merged file the name of the second file (ie: the file  %WD_FILE%)

Thank you very much again.

Best Regards

Title: Re: BAT File question
Post by Gert on Feb 25th, 2006 at 11:18pm

Just add the filename to the target directory:

COPY "C:\Texts\Header.txt" + "%WD_FILE%" "D:\TargetDirectory\%WD_FILE_N%"

WD_FILE contains the complete path of the new file (C:\MonitoredDir\Subdir\newfile.txt), WD_FILE_N contains just the filename (newfile.txt).

See this page for all variables you can use.


WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2018. All Rights Reserved.