I'm blanking out on this one.
How can I copy files that only have an extension? (Windows 2008R2/Windows7)
Is Powershell my only route? Seems like there should be an easier way to do this.
Technology Tips and News
I'm blanking out on this one.
How can I copy files that only have an extension? (Windows 2008R2/Windows7)
Is Powershell my only route? Seems like there should be an easier way to do this.
Reverse method:
PS C:\scripts> 1..12|%{$z=('?'*$_);dir $z}
Directory: C:\scripts
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/24/2013 6:20 AM 8 -1
d---- 9/25/2013 12:26 PM wf1
d---- 12/29/2013 9:46 AM wmi
d---- 8/26/2013 3:10 AM test
-a--- 9/9/2013 1:22 PM 0 dhcp
-a--- 9/9/2013 10:32 AM 87 True
-a--- 1/11/2014 4:24 PM 16 xxxx
d---- 12/28/2013 2:24 PM 43024
d---- 6/26/2013 7:22 AM test1
-a--- 12/12/2013 2:28 AM 7 query
d---- 9/2/2013 9:21 AM Rdios
d---- 8/13/2013 12:13 PM tester
d---- 11/28/2013 12:45 PM acltest
d---- 9/5/2013 7:58 AM doctest
d---- 10/4/2013 6:39 AM Outlook
-a--- 9/21/2013 10:24 AM 1713 popcorn
d---- 10/1/2013 12:21 AM Pictures
d---- 9/23/2013 12:41 AM PsTracker
d---- 6/22/2013 9:23 PM iTextSharp
d---- 9/21/2013 1:58 AM test space
-a--- 12/31/2013 9:40 AM 22509 Get-NTPTime
-a--- 9/3/2013 8:58 AM 832 Get-ArpTable
copy .* c:\test
copy .* c:\test
I would write that "How do I copy all files except those that do not have an extension.
The question was asked to exclusively different ways and I posted and answer to both versions as I understood that.
dir *|?{$_.Extension}