PARALLAX

win_file

Create, touch, or remove Windows files and directories

Collection: ansible.windows

Full Name: parallax.windows.win_file

Aliases: ansible.windows.win_file, win_file

Synopsis

Create, touch, or remove Windows files and directories

Parameters

NameTypeRequiredDefaultDescription
pathstringyesPath on the target Windows filesystem
statestringDesired path state; file never creates a missing file
modification_timestringDesired modification time, now, or preserve
modification_time_formatstringyyyy-MM-dd HH:mm:ssNumeric .NET custom timestamp format or o/O/s/u; locale-dependent formats are not yet supported
access_timestringDesired access time, now, or preserve
access_time_formatstringyyyy-MM-dd HH:mm:ssNumeric .NET custom timestamp format or o/O/s/u; locale-dependent formats are not yet supported

Example

yaml
- name: Inspect a Windows path
  ansible.windows.win_file:
    path: 'C:\Windows\Temp'
Search
    ↑ ↓ move↵ openesc close