AutoHotkey Community

It is currently May 27th, 2012, 11:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: January 30th, 2010, 11:16 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
hy,
but you didnt add the function CurrentExplorerPath() to the end of your script.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 30th, 2010, 6:36 pm 
aaffe wrote:
hy,
but you didnt add the function CurrentExplorerPath() to the end of your script.


Any chance you will upload a whole working solution? Please..
Because no matter what I do its not working


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2010, 12:27 am 
Offline

Joined: November 9th, 2008, 12:33 am
Posts: 14
Do you know of a way to modify this script so that it ignores a specific file type? For example, if the folder has only .jpg files in it, I would like the script to consider the folder to be empty and delete it. On the other hand, if the folder has both .jpg and other files in it, I don't want the script to delete it.
Anyone know of a way to do this?

Thanks,
Bookwormdragon


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 16th, 2010, 10:16 pm 
Offline

Joined: May 17th, 2008, 5:00 am
Posts: 39
Location: Dallas, TX
Laszlo wrote:
Decarlo110 also posted a very long script for this. Yours is much shorter and very nicely laid out. However, we can make it even shorter


Horray again for Laszlo! I had a path too long issue rocking the boat, and this formed the nice core of the fix

The actual fix involved setting sequential SUBST commands in a separate command prompt window against the folders that died, so the code below doesn't make for a complete solution, but here's the code for posterity sake:

Code:
;Run, notepad,,, Npid
;WinActivate, ahk_pid %Npid%
;WinWaitActive, ahk_pid %Npid%

gLoopCount := 0
gLastFolder :=
gCurrFolder :=
DelEmpty("I:")
ListVars
Pause
DelEmpty("G:")
ListVars
Pause
DelEmpty("E:\VistaOld")
ListVars
Pause

DelEmpty(dir)
{
   global
   gLastFolder := gCurrFolder
   gCurrFolder := dir
   Clipboard := dir
   Loop %dir%\*.*, 2
      DelEmpty(A_LoopFileFullPath)
   ;gFolderList .= `r`n%dir%
   ;ControlSetText, Edit1, %gFolderList%, ahk_pid %Npid% 
   FileSetAttrib, -RHS, %dir%, 1
   FileRemoveDir %dir%
}


Enjoy,
Shawn


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: rrhuffy, Yahoo [Bot] and 45 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group