Sign in to follow this  
Followers 0
hinfie

P2p Mover

12 posts in this topic

#1 ·  Posted (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.

:ph34r: Updated after comments: Optional subdirectory move. (No more lost files when moving subdirectories.)

script: P2P file mover.au3

exe: P2P file mover.exe

Playing and learning with Autoit v3

Hinfie

Edited by hinfie

Share this post


Link to post
Share on other sites



your script deleted different files from my pc and emptied directories :-(

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

DONT use it as it will delete all directories

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

#6 ·  Posted (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

:ph34r:

EDIT: Added the correct directory test...

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@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

:ph34r:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 ContinueLoop

to 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 ContinueLoop

P2P mover.au3

P2P mover.exe

Playing and learning with Autoit v3

Hinfie

Edited by hinfie

Share this post


Link to post
Share on other sites

#11 ·  Posted (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

:ph34r:

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0