Immensee Posted June 2, 2006 Share Posted June 2, 2006 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 - ImMenSe Link to comment Share on other sites More sharing options...
marfdaman Posted June 2, 2006 Share Posted June 2, 2006 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!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link to comment Share on other sites More sharing options...
ChrisL Posted June 2, 2006 Share Posted June 2, 2006 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) [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Immensee Posted June 3, 2006 Author Share Posted June 3, 2006 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? 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