Microsoft
Software
Hardware
Network
Question : explain script
I have a script that automatically make folders to matching files. I did not write the script, and would like to understand the coding behind it. Can someone break it down for me?
@echo off
for %%a in (*.*) do (
md "%%~na" 2>nul
move "%%a" "%%~na"
)
Answer : explain script
for %%a in (*.*) - for every file put it name as a and do
md "%%~na" 2>null - make directory of name a without extension ( ~n ) and do not display error ( 2> null)
move "%%a" "%%~na" - move every file to his directory
Random Solutions
Moving Exchange 2003 Cluster from Old to New Storage
Error 1008 in event log -ASP.NET
randomize filenames
SQL Server 2000 Log File Grown to Excessive Size
XP Internet Time Synch Interval
Exchange Database Corruption
Aborting an XP repair install
Tracking Clicks On Sponsor Images on My website
Run External Program
SEO - Google SERP for homepage of my site fell back to position 21 - what is the reason?