Sign in to follow this  
Followers 0
Immensee

'Converter'

4 posts in this topic

Hello,

Is there a way to convert a file into an other file?

I mean .jpg changes to .dat and also .txt changes to .dat and the text within changes also, so if they change the file back into .jpg it still can't be read, but if you have an other script it can deconvert back into the .jpg file.

I have already tried with

StringReplace($mystring,$alfabet_arrays,$replacement_arrays)

But it only shows a blank thing.

Is there an other way to do this or is it not possible?

Well, every help would be appreciated :D

- ImMenSe

Share this post


Link to post
Share on other sites



I'm not really sure what exactly it is you want to do, but take a look at "FileMove" in the heplfile for renaming files (changing extensions).


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites

Crude but...

Reverses the first 30 or however many characters of the file, to get the file back just revers the characters again, same result could be achieved by using the string encription on an amount of characters

#Include <String.au3>

$file= FileOPen ("Copy.jpg",0)


$string = FileRead ($file, FileGetSize ("Copy.jpg"))

$stringLeft = StringLeft ($string, 30)

$stringLeft = _StringReverse ($stringLeft)

$string = $StringLeft & StringTrimLeft ($string, 30)

FileClose ($file)


FileWrite ("Copy.dat", $string)

Share this post


Link to post
Share on other sites

Crude but...

Reverses the first 30 or however many characters of the file, to get the file back just revers the characters again, same result could be achieved by using the string encription on an amount of characters

#Include <String.au3>

$file= FileOPen ("Copy.jpg",0)
$string = FileRead ($file, FileGetSize ("Copy.jpg"))

$stringLeft = StringLeft ($string, 30)

$stringLeft = _StringReverse ($stringLeft)

$string = $StringLeft & StringTrimLeft ($string, 30)

FileClose ($file)
FileWrite ("Copy.dat", $string)
Thanks, that's great! but if it's a .txt file, they can see the file, any suggestion/advice about that?

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