Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Inara
  •  Inara
  • No customer Topic Starter
2013-05-10T14:28:39Z
I have a job that needs to send an 0kb file as a trigger. At the moment, I have the job copy and rename a blank template to create the file, but this seems a little awkward (and my template occasionally gets "cleaned up" and removed from the drive). I've tried creating the blank file using a 'Write File' task, but it won't let me create a completely empty file, resulting in a 1KB file size rather than the 0kb I need.

Can anyone suggest a different task or different setting for the 'Write File' task that will let me accomplish this?
Sponsor
Forum information
Support
2013-05-10T14:30:23Z
You can use the Touch file Task.

But I think the File write Task will work if you uncheck "new line".
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Inara
  •  Inara
  • No customer Topic Starter
2013-05-10T15:15:21Z
I created a Touch File task for this, and it completed successfully, but no file was created. Unchecking the 'new line' option in Write File didn't seem to work either - leaving the Value box empty still gives me the error message "You must enter a value". Our group is currently working on version 6.1.9 - would this make that much of a difference in task functions?
Support
2013-05-13T16:34:19Z
I can confirm now that Touch only works on existing files (because it is using the file filter).

Also, the File write Task requires that you write something.

Does your system really require an empty file? If yes you can use the .NET Task or create a script now to solve this now at least.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Inara
  •  Inara
  • No customer Topic Starter
2013-05-20T16:11:58Z
It's an external system that the trigger file gets sent to - I may have to discuss with them if there's a different trigger file option. In the meantime, at least I know that I'm not just missing a different way to accomplish this task.
SickPup404
2022-04-06T18:07:45Z
Just in case anyone else (like me) runs across this post to create an empty file, here's how I did it:

Set up an execute task with the following options:
  • Command:
    C:\Windows\System32\cmd.exe

  • Arguments:
    /c BREAK > [output path/filename]


For example, you could use an argument of "/c BREAK > C:\Temp\TriggerFile.txt" which will create an empty (0 byte) file named TriggerFile.txt in C:\Temp.

Hope this helps someone!
Michael Fjellström
2022-04-07T12:12:31Z
Originally Posted by: SickPup404 

Just in case anyone else (like me) runs across this post to create an empty file, here's how I did it:

Set up an execute task with the following options:

  • Command:
    C:\Windows\System32\cmd.exe

  • Arguments:
    /c BREAK > [output path/filename]


For example, you could use an argument of "/c BREAK > C:\Temp\TriggerFile.txt" which will create an empty (0 byte) file named TriggerFile.txt in C:\Temp.

Hope this helps someone!



Thanks for the advice!
Joey S
2022-04-07T14:04:14Z
You guys are missing something

image.png

image.png

image.png


Before job run
image.png

After job run
image.png
Scroll to Top