hinfie Posted August 15, 2004 Share Posted August 15, 2004 (edited) I made this script to learn some autoit functions, any comments and/or improvements are welcome.This script looks in a directory if there are completed files and moves them to an other directory, if the file is in use it just goes on to the next file.This process will continue every 30 seconds. You will be informed about completed downloads with a traytip. Updated after comments: Optional subdirectory move. (No more lost files when moving subdirectories.)script: P2P file mover.au3 exe: P2P file mover.exePlaying and learning with Autoit v3Hinfie Edited August 16, 2004 by hinfie Link to comment Share on other sites More sharing options...
kloyenz Posted August 15, 2004 Share Posted August 15, 2004 your script deleted different files from my pc and emptied directories :-( Link to comment Share on other sites More sharing options...
this-is-me Posted August 15, 2004 Share Posted August 15, 2004 You cannot use this script with kazaa because kazaa keeps its partial downloads in the same folder as the full downloads. @hinfie, it might be a good idea to let us know what filesharing client you use. Who else would I be? Link to comment Share on other sites More sharing options...
kloyenz Posted August 15, 2004 Share Posted August 15, 2004 DONT use it as it will delete all directories Link to comment Share on other sites More sharing options...
this-is-me Posted August 15, 2004 Share Posted August 15, 2004 (edited) @kloyenz, That statement is unfair since you did not look at how the script works before just running it like an idiot. If you look at the way the script works, you will see it only moves files to another directory. It does not delete them at all. If you run every program you get before finding out about it first, I have a good feeling you probably have a few viruses on your system. Another thing is that you are not making a very good impression for being a member with only 4 posts so far. Watch what you say and how you say it or you will not be helped if you need support. Edited August 15, 2004 by this-is-me Who else would I be? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 15, 2004 Developers Share Posted August 15, 2004 (edited) DONT use it as it will delete all directories <{POST_SNAPBACK}>Are you sure that directories are deleted ? I would guess that whole subdirectories from the source directory are moved to the target directory since there's no test for subdirectories in the source path. @hinfie you might want to add a test to skip directories from moving them by adding this test: While 1 $FILE = FileFindNextFile($SEARCH) If @error Then ExitLoop ; skip these references If $FILE = "." Or $FILE = ".." Then ContinueLoop If StringInstr(FileGetAttrib ($File ),"D") > 0 then ContinueLoop $EXTENSION = StringRight($FILE, 3) If $EXTENSION = "dat" Then ContinueLoop EDIT: Added the correct directory test... Edited August 15, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
kloyenz Posted August 15, 2004 Share Posted August 15, 2004 yes he moved some of my directories to files but they are fucked up now. Some files are just gone. I dont have any virusses Link to comment Share on other sites More sharing options...
pekster Posted August 15, 2004 Share Posted August 15, 2004 yes he moved some of my directories to files but they are fucked up now. Some files are just gone. <{POST_SNAPBACK}>Take a look at the script... It only moves files, not deletes them. I dont have any virusses <{POST_SNAPBACK}>The point was that you seem to run code with no idea what-so-ever of what it does. This is the kind of mentality that gets viruses installed on a computer. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 15, 2004 Developers Share Posted August 15, 2004 @Hinfie... the first test i had is just testing for the parent dir... this test is for the subdirs... see the modified post... If StringInstr(FileGetAttrib ($File ),"D") > 0 then ContinueLoop SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
hinfie Posted August 16, 2004 Author Share Posted August 16, 2004 (edited) I updated the script that it will skip directories. Never tried the script with subdirectories, so i did not found this "bug" in the script, i have seen that a directory was not moved but i never checked the contents. :"> Added $ATTRIB = FileGetAttrib($DOWNLOADLOC & "\" & $FILE) If StringInStr($ATTRIB, "D") Then ContinueLoopto the script, i will work on a option where you can choose if you want to move sub directories.this-is-me, The script skips the Kazaa dat files.. $EXTENSION = StringRight($FILE, 3) If $EXTENSION = "dat" Then ContinueLoopP2P mover.au3P2P mover.exePlaying and learning with Autoit v3Hinfie Edited August 16, 2004 by hinfie Link to comment Share on other sites More sharing options...
Developers Jos Posted August 16, 2004 Developers Share Posted August 16, 2004 (edited) yes he moved some of my directories to files but they are fucked up now. Some files are just gone. I dont have any virusses <{POST_SNAPBACK}>I believe theres a bug in the FileMove command ... see post for the details: http://www.autoitscript.com/forum/index.php?showtopic=4317 Edited August 16, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ivan Posted August 17, 2004 Share Posted August 17, 2004 I have done some stupid stuff on my machine, but one can only learn by experimenting. I hope the lesson serves a purpose. Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 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