Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Папка-шлюз 
Author Message
LonerD



PostPosted: Thu Oct 18, 2018 18:26    Post subject: Reply with quote

По быстрому на AutoHotkey получился такой скрипт.
Dir - исходная папка, Period - периодичность проверки (1000 = 1 секунде).

Code:
#NoEnv
;#NoTrayIcon
#SingleInstance ignore
#Persistent

Dir := "d:\A"
Period := "1000"

SetTimer, RemFiles, % Period
return

RemFiles:
  Loop, Files, %Dir%\*.*, FDR
  {
    if InStr(FileExist(A_LoopFileLongPath), "D")
    {
      if ( A_LoopFileDir != Dir )
        FileRemoveDir, %A_LoopFileLongPath%, 1
    }
    else
    {
      FileSetAttrib, -R, %A_LoopFileLongPath%
      FileDelete, %A_LoopFileLongPath%
    }
  }
return

_________________
Win11 x64 Eng | TC DreamLair eternal pre-α
View user's profile Send private message Visit poster's website ICQ Number


Powered by phpBB © 2001, 2005 phpBB Group