Berti Posted October 5, 2005 Posted October 5, 2005 Hi, is it possible to delete folders using wildcards via AutoIt-script? I need to delete all folders with "test" in it's name. Thanx Berti
w0uter Posted October 5, 2005 Posted October 5, 2005 (edited) DOScommand Edited October 5, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
BigDod Posted October 5, 2005 Posted October 5, 2005 You could use FileRecycle followed by FileRecycleEmpty Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Orca Posted October 5, 2005 Posted October 5, 2005 (edited) If you have a path to the dir containing *test*.* or *test* in it then sure...Dim $path = "C:/foo/bar/" $fHwnd = FindFileFirst($path & "*test*") while 1 $file = FindFileNext($fHwnd) $dir = DirRemove($file) if(@error) then ExitLoop if($dir = 1)then MsgBox(0, "FileDeleter", "File " & $file & " Deleted!") wEnd MsgBox(0, "FileDeleter", "All files / folders in " & $path & " containing test have been deleted!") ExitI'm not sure if FindFileFirst/Next will return folders, pretty sure it does. Not sure if DirRemove will remove files.You may also want to try Edited October 5, 2005 by SiC_Goat I AM ORCA!! A VERY POWERFUL WHALE!!!
B3TA_SCR1PT3R Posted October 5, 2005 Posted October 5, 2005 _RunDOS("del /S /Q C:\test.*") jeez does knowbody know about DOS??? [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]
jefhal Posted October 5, 2005 Posted October 5, 2005 _RunDOS("del /S /Q C:\test.*")jeez does knowbody know about DOS???How about doing it in CPM? DOS is for you youngsters... ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
B3TA_SCR1PT3R Posted October 6, 2005 Posted October 6, 2005 How about doing it in CPM? DOS is for you youngsters... \oh oh ohOH OH OHOHHHHHHH OH OH OHHHHHHits on NOW!! [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now