This short batch file (the comments are 2-3 times as long as the code!) seems to work with only 1 minor cosmetic issue... the command shell window appears momentarily. I will see if I can find a way to suppress that. I called the script "RollUp.bat".
HTH,
Lynn
@echo off
goto :begin
:: This batch file will copy all the files in all the subdirectories up to the parent directory on
:: which it is invoked. It will overwrite files without prompting.
::
:: You can add this to Explorer's context menu by following these instructions:
:: 1. click "Start" then "Run"
:: 2. type "sendto" into the dialog box
:: 3. click "OK"
:: 4. choose "File" -> "New" -> "Shortcut"
:: 5. enter the path and name of the batch file or browse to it's location
:: 6. click "Next" then "Finish"
::
:: The new menu item is now ready to use.
:begin
for /f "tokens=* delims=" %%V in ('dir /ad /b %1%') do (
xcopy /s /q /y %1\%%V %1 > nul
)
Main Topics
Browse All Topics





by: IceColdasPosted on 2005-02-16 at 00:21:17ID: 13321713
uhmm, and what programming language you have in mind for acomplishing this task ?
and yes, it can be done ... but u need a little API knowledge