kcvinu Posted January 23, 2015 Share Posted January 23, 2015 (edited) Hi there, I have a few download folders and they contains hundreds of downloaded files. So i need to cut each file and make a new folder there and paste my file inside that folder. This is the steps to automate; 1. If i select a file in win explorer and right click it, then i need a context menu option there. ("Move file into folder") 2. If i select the context menu item, then 2 a. Find the name of the selected file 2 b. Cut the file and create a new folder there. 2 c. Rename the folder with the filename(i.e. if file name is "Winrar_setup_32_Bit.exe", then the folder name should be "Winrar". 2 d. Paste the file inside the folder. For this task, i know; 1. how to create a folder 2. how to cut n number of letters from file name with StringLeft() And i don't know; 1. how to make a context menu entry for my script. 2. how to get the selected file name 3. how to rename the folder 4. how to cut and paste the selected file. Edited January 23, 2015 by kcvinu Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
jdelaney Posted January 23, 2015 Share Posted January 23, 2015 DirCreate _FileListToArray FileCopy IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
kcvinu Posted January 23, 2015 Author Share Posted January 23, 2015 Hi jdelaney, Thank you for the quick reply. But i have edited the question. So i request you to read the question once again please. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 23, 2015 Moderators Share Posted January 23, 2015 And i don't know; 1. how to make a context menu entry for my script. 2. how to get the selected file name 3. how to rename the folder 4. how to cut and paste the selected file. 1. Don't, that's poor form, relying on a context menu not being interrupted by another app. 2. Use _FileListToArray(), work out the extensions you want to list 3. DirMove()/FileMove() will allow you to rename a folder/file 4. DirMove()/FileMove() will allow you to move a folder/file (and rename it) No more "Don't know how's now" (10's of thousands of examples of all) kcvinu 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Deye Posted January 23, 2015 Share Posted January 23, 2015 First you will need to register a context menu to right click with something like this ;-------------------------------------- Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\mv] @="Move to dedicated folder" [HKEY_CLASSES_ROOT\*\shell\mv\command] @="pathto\\my.exe %1" ;-------------------------------------------1. then in the begining of your script $CmdLine[1] will be the full path of the file name you want to control ]If $cmdline[0] > 0 Then $file2move=$CmdLine[1] EndIf2. compile the script to "my.exe" place it in "pathto=the location it will be"3. test it out kcvinu 1 Link to comment Share on other sites More sharing options...
kcvinu Posted January 23, 2015 Author Share Posted January 23, 2015 Hi SmOke_N, Thank you. Let me try.. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
kcvinu Posted January 23, 2015 Author Share Posted January 23, 2015 Hi Deye, Thank you. Let me try... Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
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