Hi Jerome thanks for the response. Lee had the solution (add %%F to end of line). I appreciate all the suggests.
Jerome Baum-2 wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > jb1111 <[email protected]> writes: > >> Hi. It outputs a same named .pgp file. When decrypted, it's empty. I >> tried >> removing the echo before, "Password" and that breaks the process. Sorry, >> I >> haven't done batch in years and gpg is a new thing for me. Result: >> >> C:\outgoingdropfolder>FOR /F "delims=" %F IN ('MORE < >> "C:\Users\myprofile\AppData\Local\Temp\~encryptlist.txt"') DO ( >> IF EXIST %F ( >> Echo Password | GPG --batch --encrypt --passphrase-fd 0 -r 131FDA81 -o >> "C:\encryptedfiles\%F.pgp" >> IF ERRORLEVEL 0 DEL "%F" >> ) >> ) >> C:\outgoingdropfolder>( >> IF EXIST test345.txt ( >> Echo Password | GPG --batch --encrypt --passphrase-fd 0 -r Publickeyuid >> -o >> "C:\encryptedfiles\test345.txt.pgp" >> IF ERRORLEVEL 0 DEL "test345.txt" > > Can you try removing both the echo and the "passphrase-fd 0" argument? > Sorry for not mentioning that. Here's what my command looks like: > > gpg --batch --encrypt -r jerome -o temp.gpg crontab.txt > > Can you try running just a single command like that one and get that to > work first, before you do it in a batch file? > > - -- > PGP: A0E4 B2D4 94E6 20EE 85BA E45B 63E4 2BD8 C58C 753A > PGP: 2C23 EBFF DF1A 840D 2351 F5F5 F25B A03F 2152 36DA > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (Cygwin) > > iQI+BAEBCgAoBQJNjHUXIRhodHRwOi8vamVyb21lYmF1bS5jb20vamVyb21lLmFz > YwAKCRBj5CvYxYx1OqjGEACiPZNfaz1jzDMhaVaZ4ZXhmBVrOQYttYbM3ka1Vykn > D1BpO5/XqmyfWgaVWmfQN2s5qpWqZawBAv7L1os0PRSPowS3bIbdX17HmYYU8ONA > C7UDXj1ETHgIK1iVJI1/hyNXemIB957tBJG6qpQLKw9oIBBy6b62jwlGv2VzFNNj > rqPinIOJ/f6HIvUGjj2yADcfWiYcnfNVeED1Nn+jLP+qy97l5UVhvYEDUMzCaF4l > 8zih60I5yPZORJGFHPNApF9lTWs+I/7M9Gx5kNaDsc65O55auzo8UmfhMT2Lc3cm > xZ5P9Zs9eehjvOdaSDYhOW7N/MTPdEkU7yXgxTEaezIfF8gEsv1cUeOGeTa3wc5G > cK519BvDJ8B/ms5nHmhKj2qfAAdJkEMl+EeFbYUNngA6C/NnGi4ZjvUFsyPEMjX5 > 2aubk4VakPvTRkfFvCF8BQsdBRLKh/hwsbdE2BGxjGvgCxXe5lBDaJwcUBtGnjD8 > 7UeiLtfWbQKIAzUFpKDSj4NPlzzQdYZxHYJKX2VpufeZ+K6zBqrCWjuITytQIV+d > c+G3RdtgZXeT0TCx2QGb6qNSKH/zZXD65wYI0SiAyCizoDjuqO7yZf2gVxg+F3To > Oy4ttD50bVSKolJ03wMy/PCUIm5KHiBwi4X963O3Gs+afxzgq4Ac6+kAuHYCiuRg > xg== > =tLRw > -----END PGP SIGNATURE----- > > > _______________________________________________ > Gnupg-users mailing list > [email protected] > http://lists.gnupg.org/mailman/listinfo/gnupg-users > > -- View this message in context: http://old.nabble.com/empty-file-generated-when-running-GPG-batch-tp31223498p31237605.html Sent from the GnuPG - User mailing list archive at Nabble.com. _______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
