#How to create a .file
or .folder
on Windows
There are several ways
- Create
file.txt
- Rename to
.file.
, the last dot will be dropped, you'll have.file
Works the same with a file or a directory.
param( | |
[parameter(Mandatory=$true)] | |
[string] $path | |
) | |
# the code below has been used from | |
# https://blogs.technet.com/b/heyscriptingguy/archive/2013/10/19/weekend-scripter-use-powershell-and-pinvoke-to-remove-stubborn-files.aspx | |
# with inspiration from | |
# http://www.leeholmes.com/blog/2009/02/17/moving-and-deleting-really-locked-files-in-powershell/ | |
# and error handling from |
# Inspiration from | |
# | |
# http://blogs.msdn.com/b/opticalstorage/archive/2010/08/13/writing-optical-discs-using-imapi-2-in-powershell.aspx | |
# | |
# and | |
# | |
# http://tools.start-automating.com/Install-ExportISOCommand/ | |
# | |
# with help from | |
# |