Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Create a new folder with selected files!


  • Please log in to reply
6 replies to this topic
Corzza
  • Members
  • 5 posts
  • Last active: Oct 12 2015 06:49 AM
  • Joined: 20 Aug 2015

Ok so hello everyone this is my first ever post and actually the first ever script I have made! I thought this was extremely useful as it is already a function on mac however not on windows sad.png
 
What it is is a script that allows you to create a new folder which either copies or cuts selected files into it! i have been searching for hours for this but  could not find it so i decided i would try to make it myself. It is a really simple script so anyone starting out should be able to understand the functions. 
 
Alright so enough typing... Here it is! 

 

Update1 :

New:

If folder name isnt entered script is canceled

Fixes:

Fixed problem where cut(^x)  would stay after inputbox closed.

Fixed problem where it would copy before going into folder (added sleep before copy)

 

Update 2:

New: added Gui instead of Copy or move inputbox!

#IfWinActive, ahk_class CabinetWClass 
!^+n::
Gui, Add, Text, , Would you like to Copy or Move the files?

Gui, Add, Button, gLabel1, Copy

Gui, Add, Button, gLabel2, Move

Gui, Show, w250 h100

Return



label1:
Gui, Submit
{
inputbox, foldername, Create new Folder, What would you like to name the folder?
If (foldername="")
{
return
}
send ^c
sleep 100
 send ^+n
send %foldername%
send {enter}
sleep 100
send {enter}
sleep 300
send ^v
Return
}
label2:
Gui, Submit
{
inputbox, foldername, Create new Folder, What would you like to name the folder?
If (foldername="")
{
return
}
send ^x
sleep 100
 send ^+n
send %foldername%
send {enter}
sleep 100
send {enter}
sleep 300
send ^v
Return
}

 

Old - Without Gui

#IfWinActive, ahk_class CabinetWClass 
!^+n::
inputbox, copycut, would you like to "copy" or "cut" the files?
if (copycut="copy")
{
inputbox, foldername, Create new Folder, what would you like to name the folder?
If (foldername="")
{
return
}
send ^c
sleep 100
 send ^+n
send %foldername%
send {enter}
sleep 100
send {enter}
sleep 300
send ^v
}
if (copycut="cut")
{
inputbox, foldername, Create new Folder, what would you like to name the folder?
If (foldername="")
{
return
}
send ^x
sleep 100
 send ^+n
send %foldername%
send {enter}
sleep 100
send {enter}
sleep 300
send ^v
}
else
	return


Corzza
  • Members
  • 5 posts
  • Last active: Oct 12 2015 06:49 AM
  • Joined: 20 Aug 2015

I revised it a little so that so that if nothing is put in the inputbox then the script will stop also made the input instructions a bit clearer!

Hope people are finding this useful!

#IfWinActive, ahk_class CabinetWClass 
!^+n::
inputbox, copycut, would you like to "copy" or "cut" the files?
if (copycut="copy")
{
send ^c

inputbox, foldername, Create new Folder, what would you like to name the folder?
If (foldername="")
return
else
{
send ^+n
send %foldername%
send {enter}
sleep 100
send {enter}
sleep 100
send ^v
}
if (copycut="cut")
{
send ^x
inputbox, foldername, Create new Folder, what would you like to name the folder?
send ^+n
send %foldername%
send {enter}
sleep 100
send {enter}
sleep 100
send ^v
}}
else
return

:D



SirBungly
  • New members
  • 1 posts
  • Last active: Aug 24 2015 04:23 PM
  • Joined: 21 Aug 2015

Amazing script! Works a charm and is incredibly useful all the time!

Thanks!



Guest10
  • Members
  • 1216 posts
  • Last active: Oct 30 2015 05:12 PM
  • Joined: 27 Oct 2012

Where do those copies or cuts selected files come from? ;)



Corzza
  • Members
  • 5 posts
  • Last active: Oct 12 2015 06:49 AM
  • Joined: 20 Aug 2015

What do you mean?



EmtaOnline
  • New members
  • 1 posts
  • Last active: Mar 06 2016 09:31 AM
  • Joined: 24 Aug 2015

whats hotkey ?



Corzza
  • Members
  • 5 posts
  • Last active: Oct 12 2015 06:49 AM
  • Joined: 20 Aug 2015

cntrl + shift + alt + n is the hotkey