Jump to content

Some Tools I've coded


Obi-Wahn

Recommended Posts

Hi!

Since I found the scriptlanguage AutoHotKey, which is quite similar to AutoIT, I started developing some tools.

Here some, which are -I think- maybe useful for your Switchblade.

All of my Apps are OpenSource. So feel free to modify it, as you want, but you have to add the

modified Sourcecode again to the Program, and Add a Comment to the Source or to a textdocument,

where the Changes, the date and your name (at least the forumname) have to be stored.

I'M NOT RESPONSIBLE FOR ANY DAMAGES OF THE SYSTEM, WHERE MY APPS ARE EXECUTED

=======================================================================

FileCopier (fc.exe)  DOWNLOAD

fc is a tool, which searches a path for files, and copy them to a defined folder.

There are some settings, which are stored into the Help dialogue.

The Script is OpenSource, you'll get the Sourcecode with typing "fc.exe /Src"

(Without "" )

Why I've created this:

Because "Caryl3" needs a possibility to copy files, and I've a little sparetime, so I coded this.

(SEE THIS THREAD)

Help dialogue:

fc.exe "Drive:Searchstring" "Targetfolder" [/I] [/O] [/Box] 
fc.exe [/Src] [/?]

"Drive:Searchstring"       Defines a Drive and a String which is searched for.
"Targetfolder"              Defines a Targetfolder where the files will be copied to.
/I                          Includes Subfolders to the search.
/O                          Overwrites existing files
/Box                        Displays a Messagebox with the amount of copied files
/Src                        Appends the Source of this program to a file
/?                          Displays this Help

Example:
fc.exe "C:*.txt" "X:Files" /I /Box
       Copies every textdocument of drive C: to folder X:Files and displays a Popup after finishing

fc.exe /Src
       Appends the Source of this tool to a .ahk File

Changelog:

16.May.2K7 (15:37 GMT +1)

+ Added 2nd example to the Help

+ Added explanation of examples

+ Added "commandlinetool-beaviour" (if less than 2 parameters passed to the scipt, a cmd.exe window popps up shortly)

+ Bugfix: Recompile is now easier for developer who appended the source. (you don't have to rename the source now again)

+ Lil more explanation of the code into the source

+ Added credits

+ Sourcecode-Cleanup

----------------------------------------

Launcher (launch.exe)   DOWNLOAD

This is a tool for the Launch menue of a Non-U3 Switchblade.

Execute the Program first in normal mode, and it will append a new, predefined autorun.inf file.

The .inf file have a Shell entry, for this who have the Autoplay feature disabled,

hidden as a Virusscan, which actually opens a small message, that no virus was found, when all apps are launched.

Why I've created this:

Because for my Switchblade release (which is comming soon).

Predefined autorun.inf

[autorun]
open=launch.exe /S
icon=%windir%system32shell32.dll,4
action=Open folder to view files
label=Obi-Wahn

ShellScan=Scan for Viruses
ShellScanCommand=launch.exe /S /V

[Launch]
1=switchblade.exe
2=explorer.exe .

# Additional programs can be added with adding programs to the list,
# one per line, asc. index no.

# If you want to execute the Program, File whatever, in hidden mode, simply add after the name " , , Hide"
# (Without "", but the first space is IMPORTANT)
# Example:
# 3=additionalitem.cmd , , Hide

Infos:

I call the Icon from the shell32.dll, so that It's in the Autoplay diaogue as the "Open folder" entry

I've tried to call the String (Open folder to view files) from the shell too, but I wasn't able to do this.

IMPORTANT: This tool is in developing phase.

Parameter:

/S       lauches every entry into the [Launch] Section
/V             (As second parameter) displays a pseudo "no-Virus" message at the end of launching
/Src          Append the Sourcecode to a file.

----------------------------------------

File (file.exe)   DOWNLOAD

This tool is similar to fc.exe. But while the function is the same, operations are differen, you can choose more than one searchmask and do diferent tasks like Copying, Moving, Deleting, ...

Warning: Like my other tools, this is Beta software. I'm not responsible for any damages on your or other systems.

Why I've created this:

Because fc.exe has several bugs, some fixed here.

Parameter:

file.exe /A:[C D M SD] "C:*.txt + C:*.doc" "X:Files" [/I] [/O] [/P] [/Box] [/Log] [/Debug]
file.exe /A:SC <Target> <Linkfile> [<Workingdir> <Args> <Description> <Icon> <Shortcutkey> <IconNo> <Max|Min|Normal>] [/Debug]
file.exe /A:E
file.exe /Src

/A:C        Copies found Files to the Targetfolder
/A:M        Moves found Files to the Targetfolder
/A:D        Deletes found Files
/A:SD        Moves found Files to Paper Bin
/A:SC        Creates a Shortcut
/A:E        Empties the Paper Bin
/I        Includes Subfolders to the Search
/O        Overwrites Files into the Targetdirectory (Only Copying and Moving)
/P        Creates the same Folder Structure as Found (Only Copying and Moving)
/Box        Shows a Messagebox after Finishing
/Log        Creates a Logfile into the Targetfolder (Copying and Moving into the Targetfolder, Deleting into Tempfolder)
/Debug        Shows a Messagebox which Contains all Variables and their Values
/Src        Appends the Sourcecode to a .ahk File

"C:*.txt + C:*.doc"    Strings which shall be searched
"X:Files"            Targetfolder where the Files shall be copied/moved

For the Shortcutsyntax: If you want to obmit a parameter you have to define it like "" for empty space.
Else it will fail or define the parameter wrong.

Examples:
file.exe /A:SC C:Downloads Downloads.lnk "" "" Downloaddirectory
    Creates a Shortcut to the Folder C:Downloads, Linkfile is Downloads.lnk at the Scriptdirectory,
    no workingdir, no arguments but a Diescription (It's the Downloaddirectory)

file.exe /A:D "C:Dokumente und EinstellungenObi-WahnDesktop*.lnk"
    Deletes all Shortcuts on the Desktop WITHOUT moving them to the Paperbin

file.exe /A:SD "C:Dokumente und EinstellungenObi-WahnDesktop*.lnk"
    Deletes all Shortcuts on the Desktop and moves them to the Paperbin.

file.exe /A:C "C:*.txt" "X:Files" /I /P
    Copies all Textfiles to the Targetdirectory (X:Files), includes Subfolders to the search
    and creates the same folder structure as on the Computer.

--------------------------------

Obi-Wahn's Switchblade SEE THIS TOPIC

--------------------------------

Processkiller (pkill.exe) DOWNLOAD

This tool is used to terminate processes. THIS IS NOT A ANTIVIRUS / FIREWALLKILLER (but may works)

You write in a file a processname per line, and define this file as 1st parameter.

The second parameter is optional. If you define another file as the 2nd parameter, pkill.exe will write every

found processname to the 2nd file.

Why I've created this:

Because this is may be usefull. I use it all time when i have to speed up my system quick.

Parameters

pkill.exe <list> <output>
pkill.exe /?    Shows the Help
pkill.exe /Src    Appends the Sourcecode to a file

<list>        List of Processnames (e.g.: ashServ.exe, one entry per line req)
<output>    List of Found Processes

Example:
pkill.exe processes.lst found.txt
    Reads every FULL line of "processes.lst", and If the processname exists,
    it will try to close the process, and write the processname to "found.txt"

-----------------------

That's it.

Maybe someone need this, so download it and use it.

Future:

Rapidshare full auto downloader (I know, there exist several, but I try to code one by myself).

If any of you has a wish for a tool, so feel free to send me a pm. If it's possible for me (skill and time), I'll try to realize this.

(Only if it makes sense, because if it's possible with a simple command in the batch, or there allready tools released, I don't code this)

Regards

Obi-Wahn

Link to comment
Share on other sites

Yay! You finally opened a topic for your tools!

Remeber, everyone, you can do a lot of things in batch, you just have to know how to do them.

EDIT: Can fc.exe copy more than one file type per command?

Link to comment
Share on other sites

No. Fc is pointed to copy one type of file per command.

It's not one FILEtype, but one TYPE of file.

fc.exe "C:log*" "X:Files" /I

Copies all files which are starting with "log" and doesn't matter which fileextention are the files have.

fc.exe "C:*.doc" "X:Files" /I

Copies all .doc Files to the destination folder.

As soon I've time, I'll write a modification of the code to support more than one type of searchstring.

Link to comment
Share on other sites

Would it be at all possible to add a switch to make File Copier preserve directory structure when copying from sub folders?

It's nice being able to copy files located in sub folders, but not when they all get dumped into the target folder :-P

Thanks!

Link to comment
Share on other sites

I think, this shouldn't be a big problem.

Then I'm working on this, the more-file-types-per-command issue and the varprob, which makes me kind of mad, cause I pass a parameter from the manifestfile of my switchblade and it works.

Link to comment
Share on other sites

There's an issue with copying more than one file type at once? It works fine for me...

For example, the code below copies every file inside "C:Documents and settings" completely indiscriminately, and dumps them all into "D:Documents and Settings Backup" (Though the directory structure gets blown away, so everything located in a sub folder gets dumped directly into the Backup folder)

fc.exe "C:Documents and Settings*" "D:Documents and Settings Backup*" /I /O

Link to comment
Share on other sites

I'm currently developing my own collection of tools, so I looked to a tool which dumps nice and quietly files. 

So I tried fc.  exe and it worked quiete fine, but there appears an icon in the systray. 

Is this normal or have I forgotton a switch?

Joerg

Link to comment
Share on other sites

  • 4 weeks later...

Wow! That is awesome! Thanks a bunch! I am going to see what I can do with it. This is so much more complex than fc.exe, which is a good thing, don't get me wrong, but will take more time to figure out. Once again, thanks so much. I think you should be called "The_AHK_Jedi"  :P.

Link to comment
Share on other sites

Thanks.

Unfortunately, I detect one bug til jet. On the Searchmask if the search should performed into a subfolder, containing a plus symbol (+), then it doesn't work. Because I split the Searchmasks on a plus symbol.

I've to change this, but at the moment I've only a rare amount of time.

EDIT: New tool added: pkill.exe

Link to comment
Share on other sites

It's great that you coded all this, as it gives me a little look into more advanced AHK. The File tool (file.exe) is wonderful, I am very happy you made it. Are you going to continue work on File Copier now that File is out?

Link to comment
Share on other sites

May I do, but file.exe is in fact a updated version of fc.exe. I've fixed several bugs and added more features. however, at the moment, I've currently a  lot to do with my diploma thesis, so I don't do very much coding work now.

May I seperate the copy-part of file.exe and put it into a updated version of fc.exe

Link to comment
Share on other sites

how do i get this to work all i get when i click it is it flashes cmd for a sec and disapperse

and can u make a U3 version?

File (file.exe)  DOWNLOAD

This tool is similar to fc.exe. But while the function is the same, operations are differen, you can choose more than one searchmask and do diferent tasks like Copying, Moving, Deleting, ...

Warning: Like my other tools, this is Beta software. I'm not responsible for any damages on your or other systems.

Link to comment
Share on other sites

how do i get this to work all i get when i click it is it flashes cmd for a sec and disapperse

and can u make a U3 version?

File (file.exe)  DOWNLOAD

This tool is similar to fc.exe. But while the function is the same, operations are differen, you can choose more than one searchmask and do diferent tasks like Copying, Moving, Deleting, ...

Warning: Like my other tools, this is Beta software. I'm not responsible for any damages on your or other systems.

Its a command line tool, it doesn't have a gui. read the parameter in the first post...

File (file.exe)  DOWNLOAD

This tool is similar to fc.exe. But while the function is the same, operations are differen, you can choose more than one searchmask and do diferent tasks like Copying, Moving, Deleting, ...

Warning: Like my other tools, this is Beta software. I'm not responsible for any damages on your or other systems.

Why I've created this:

Because fc.exe has several bugs, some fixed here.

Parameter:

file.exe /A:[C D M SD] "C:*.txt + C:*.doc" "X:Files" [/I] [/O] [/P] [/Box] [/Log] [/Debug]
file.exe /A:SC <Target> <Linkfile> [<Workingdir> <Args> <Description> <Icon> <Shortcutkey> <IconNo> <Max|Min|Normal>] [/Debug]
file.exe /A:E
file.exe /Src

/A:C        Copies found Files to the Targetfolder
/A:M        Moves found Files to the Targetfolder
/A:D        Deletes found Files
/A:SD        Moves found Files to Paper Bin
/A:SC        Creates a Shortcut
/A:E        Empties the Paper Bin
/I        Includes Subfolders to the Search
/O        Overwrites Files into the Targetdirectory (Only Copying and Moving)
/P        Creates the same Folder Structure as Found (Only Copying and Moving)
/Box        Shows a Messagebox after Finishing
/Log        Creates a Logfile into the Targetfolder (Copying and Moving into the Targetfolder, Deleting into Tempfolder)
/Debug        Shows a Messagebox which Contains all Variables and their Values
/Src        Appends the Sourcecode to a .ahk File

"C:*.txt + C:*.doc"    Strings which shall be searched
"X:Files"            Targetfolder where the Files shall be copied/moved

For the Shortcutsyntax: If you want to obmit a parameter you have to define it like "" for empty space.
Else it will fail or define the parameter wrong.

Examples:
file.exe /A:SC C:Downloads Downloads.lnk "" "" Downloaddirectory
    Creates a Shortcut to the Folder C:Downloads, Linkfile is Downloads.lnk at the Scriptdirectory,
    no workingdir, no arguments but a Diescription (It's the Downloaddirectory)

file.exe /A:D "C:Dokumente und EinstellungenObi-WahnDesktop*.lnk"
    Deletes all Shortcuts on the Desktop WITHOUT moving them to the Paperbin

file.exe /A:SD "C:Dokumente und EinstellungenObi-WahnDesktop*.lnk"
    Deletes all Shortcuts on the Desktop and moves them to the Paperbin.

file.exe /A:C "C:*.txt" "X:Files" /I /P
    Copies all Textfiles to the Targetdirectory (X:Files), includes Subfolders to the search
    and creates the same folder structure as on the Computer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...