0

I have made a custom caesar cipher decryptor which works:

SET "tekst=text to de encrypt"

SET tekst=%tekst:e=f%
SET tekst=%tekst:k=e%
SET tekst=%tekst:b=k%
SET tekst=%tekst:v=b%
SET tekst=%tekst:j=v%
SET tekst=%tekst:h=j%
SET tekst=%tekst:y=h%
SET tekst=%tekst:i=d%
SET tekst=%tekst:c=i%
SET tekst=%tekst:s=c%
SET tekst=%tekst:g=s%
SET tekst=%tekst:a=g%
SET tekst=%tekst:z=a%
SET tekst=%tekst:r=z%
SET tekst=%tekst:q=r%
SET tekst=%tekst:x=m%
SET tekst=%tekst:w=u%
SET tekst=%tekst:p=w%
SET tekst=%tekst:n=p%
SET tekst=%tekst:u=n%
SET tekst=%tekst:o=t%

echo %tekst% >> output.txt

My problem here is that I want to use a .txt file to read from instead of having to copy the text to where the text variable is defined, because I have alot of textfiles that need to be decrypted. Is there a way to do this in cmd?

  • You are looking for the [`for /F` command](http://ss64.com/nt/for_f.html)... – aschipfl Feb 21 '17 at 22:29
  • Possible duplicate of [Batch files: How to read a file?](http://stackoverflow.com/questions/206114/batch-files-how-to-read-a-file) – aschipfl Feb 21 '17 at 22:31

0 Answers0