cmd - Delete all files but not directory -


echo process run time: %date% %time% >> log1.txt  echo  disconnecting existing drive if  >> log1.txt net use e: /delete  net use e: \\myserver_ddl\mydrive$ /user:user1\my_test password xcopy /s e:\*.* \\another_server_share_loc\tmp rem del %pathtofolder%\*.*   /s /f  /q 
  1. after copying files \\another_server_share_loc\tmp want delete files folder not want delete sub-directory \\myserver_ddl\mydrive$ (it drive many folders subfolders)
  2. i want redirect output in file along pathname copying file

to delete files on e: mapped drive after xcopy has finished, log, try this:

del e:\*.*? /s >>"%userprofile%\desktop\file.log" 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -