NameSilo

WANTED: Easy Batch File Job

SpaceshipSpaceship
Watch
Status
Not open for further replies.

MicroGuy

Miembro EspecialTop Member
Impact
1,493
Please do not do any work if you see PM sent in this thread

I need a batch file that will work on Windows Server Web Edition that will move certain file types from the directory root and ALL sub directories into another directory.

Example:

Destination
e:\moved

Source
c:\documents\bg.doc
c:\documents\bg.htm
c:\documents\abc\ea.doc
c:\documents\abc\ea.doc
c:\documents\abc\eb.text
c:\documents\abc\ec.doc
c:\documents\abc\a.doc
c:\documents\123\a.htm
c:\documents\bg.doc
c:\documents\def\c.txt

I want the batch file to move all the .doc and .txt files (or other specified extensions) from the root directory AND ALL subdirectories into the e:\moved folder.

The commands in the batch file should specify directory root and all sub directories. Please make the batch file along with comments in the file containing instructions.

I can pay $10.00 upon completion. Please post "PM sent" in thread and send me a link to the file along with your PayPal email address. Upon receipt and testing, I will send funds.

Please do not do any work if you see PM sent in this thread
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
Here you go

Code:
set ext=xls bmp
set root=d:\data\532224979\Desktop\TEST
set final=d:\data\532224979\Desktop\TEST\final\

for %%a in (%ext%) do (
	for /f "delims=" %%b in ('dir /b/s/a-d "%root%\*.%%a"') do (
		MOVE /Y "%%b" "%final%"
))

You can still request my paypal account if this helped you ;)
 
0
•••
Status
Not open for further replies.
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back