Jump to content
UBot Underground

Making Multiple Copies Of A File


Recommended Posts

Hi guys,

 

Drawing a blank here...

 

I want to be able to create multiple copies of a file.  For example, I want to make 10 copies of a text file.

 

How would I go about doing that?

 

I tried implementing different ways but none of them worked.

 

Any help would be appreciated.

 

Thanks!

 

-samcro

Link to post
Share on other sites

Here is a quick example:

set(#CONTENT, $read file("c:\\myfile.txt"), "Global")
set(#FILE Number, 1, "Global")
loop(10) {
    save to file("c:\\myfile{#FILE Number}.txt", #CONTENT)
    increment(#FILE Number)
}
  • Like 1
Link to post
Share on other sites

 

Here is a quick example:

set(#CONTENT, $read file("c:\\myfile.txt"), "Global")
set(#FILE Number, 1, "Global")
loop(10) {
    save to file("c:\\myfile{#FILE Number}.txt", #CONTENT)
    increment(#FILE Number)
}

 

@UbotDev.com, that works pretty good thanks!

 

Has anyone done it with images?  I tried it with this same code but the images turn out to be corrupted.

 

Thanks

Link to post
Share on other sites

@UbotDev.com, that works pretty good thanks!

 

Has anyone done it with images?  I tried it with this same code but the images turn out to be corrupted.

 

Thanks

As Dan already mentioned you would use shell command for that.

Link to post
Share on other sites

You would do something like:

set(#FILE Source Path, "c:\\myfile.jpg", "Global")
set(#FILE Number, 1, "Global")
loop(10) {
    set(#RESULT Copy, $plugin function("Advanced Shell.dll", "$shell batch hidden", "copy \"{#FILE Source Path}\" \"c:\\myfile{#FILE Number}.jpg\""), "Global")
    increment(#FILE Number)
}

This method should also be more memory friendly.

  • Like 1
Link to post
Share on other sites

You would do something like:

set(#FILE Source Path, "c:\\myfile.jpg", "Global")
set(#FILE Number, 1, "Global")
loop(10) {
    set(#RESULT Copy, $plugin function("Advanced Shell.dll", "$shell batch hidden", "copy \"{#FILE Source Path}\" \"c:\\myfile{#FILE Number}.jpg\""), "Global")
    increment(#FILE Number)
}
set(#WORKER Id, $find regular expression($plugin function("Command Line Arguments.dll", "$command line arguments"), "(?<=id=)\\d+"), "Global")
if($not($comparison(#WORKER Id, ">", 0))) {
    then {
        set(#WORKER Id, 67, "Global")
        set(#WORKER Id, 68, "Global")
    }
    else {
    }
}

This method should also be more memory friendly.

 

Ok, sounds good, but I don't have your plugin actually.  When I went to your site to sign up to download, it won't subscribe me to aweber because they have been receiving a massive DDOS this whole week.

 

Any other way I can get your plugins?

 

You can add me to your list manually if you like.

 

Thanks

 

- samcro

Link to post
Share on other sites

Ups, now I noticed I copied too much, so I removed some code. :)

 

Ok, sounds good, but I don't have your plugin actually.  When I went to your site to sign up to download, it won't subscribe me to aweber because they have been receiving a massive DDOS this whole week.

 

Any other way I can get your plugins?

 

You can add me to your list manually if you like.

 

Thanks

 

- samcro

 

You could also use Ubot shell command, but you would need to point it to a batch file instead of entering multiple command line commands in command directly.

 

Yes, you are right...Aweber is down for a few days already. :/ Send me an email via website if you need it, and I'll send you the zip there.

Link to post
Share on other sites

Ups, now I noticed I copied too much, so I removed some code. :)

 

 

You could also use Ubot shell command, but you would need to point it to a batch file instead of entering multiple command line commands in command directly.

 

Yes, you are right...Aweber is down for a few days already. :/ Send me an email via website if you need it, and I'll send you the zip there.

 

I just sent you an email.

 

Thanks!

 

-samcro

Link to post
Share on other sites

@UbotDev.com, just wanted to let you know that I used your Advanced Shell plugin and it works great for this!

 

Thanks again!

 

- samcro

Link to post
Share on other sites

@UbotDev.com, just wanted to let you know that I used your Advanced Shell plugin and it works great for this!

 

Thanks again!

 

- samcro

Nice to hear you solved it!

 

No problem.

Link to post
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.

Loading...
×
×
  • Create New...