GoGreen PC TuneUp™
Learn More

Insta-Install™
this is how we code sign our software and ssl encrypt our websites from our affiliate partner SSL.com

myBlog

myBlog Home

Back to Blog MTNCOMP


MS-DOS batch cmd file scripting - review in gathering processing files

Published: Tuesday, October 20, 2020 written by Andy Flagg
View Count: 50
Keywords: MS-DOS, Scripting, Batch, CMD



This is Just a quick if conditional scan for files wherever you drop your script command (cmd) batch file.
 
filename: scandirsfiles.cmd - this is unfinished, just something I am considering for a tool.
 
 
 
 @echo off
@echo scanning drive
if exist  scandrivelock.txt (
    rem locking file exists so need to bail out
    @echo locking file exists
    if exist alldirfiles.txt (
        rem scan_drive is processing
    ) else (
        rem scan drive is not processing, why not
    )
) else (
    rem locking does not exist so lock it and get things started
    @echo lock > scandrivelock.txt
    rem process directory search from existing drop point
    dir /b /s > alldirfiles.txt
    rem scan complete, remove lock file
    @del scandrivelock.txt
)    
@echo done
@pause

more to come...
 

if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.

© 2020 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.