I want to put this batch file into any directory I need. After running it, it should create an undeletable folder named sm. in that directory, and copy all files and folders in that directory into the undeletable folder sm.. With copy I can only copy files, not folders. How should I handle it with xcopy? Please give me some pointers, experts! The contents are as follows:
@echo off&mode con cols=50 lines=12
title Create or delete a private folder
if not exist sm..\nul (
md sm..\
color 5a&cls&echo.&echo The private folder has been created! Files will be put into the private folder...&ping/n 2 127.1>nul
echo Copying files...
copy %CurDir% * sm..\>nul 2>nul
) else (
rd /s/q sm..\
color 5e&cls&echo.&echo The private folder has been deleted!&ping/n 2 127.1>nul
)
color 5b&cls&echo.&echo Run it again to recreate or delete!&ping/n 2 127.1>nul
@echo off&mode con cols=50 lines=12
title Create or delete a private folder
if not exist sm..\nul (
md sm..\
color 5a&cls&echo.&echo The private folder has been created! Files will be put into the private folder...&ping/n 2 127.1>nul
echo Copying files...
copy %CurDir% * sm..\>nul 2>nul
) else (
rd /s/q sm..\
color 5e&cls&echo.&echo The private folder has been deleted!&ping/n 2 127.1>nul
)
color 5b&cls&echo.&echo Run it again to recreate or delete!&ping/n 2 127.1>nul

