I have a .txt file containing 2400 separate network paths to directories that i need to 7zip into separate encrypted .7z files.
I believe i can do something like this in power shell however haven't gotten it to work so far
dir | ForEach-Object { & "7za.exe" a $_.BaseName $_.Name }
I've tried the following in a batch file, moving the batch file into the directory when the folders are i want to compress and it works, but i need it to read the directory paths from a txt file containing a list
Any suggestions?
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.7z" "%%X\"
gc paths.txt | % { }
..txt
file to a.bat
file, record a macro in Notepad++ that massages the line and skips to the next, and run it 2400 times.