Author Topic: Getting file list  (Read 6398 times)

erik

  • Newbie
  • *
  • Posts: 1
    • View Profile
Getting file list
« on: January 15, 2013, 16:10:12 »
I finally got something to work get a file list in a file and read it in a batch file

Code: newbielink:javascript:void(0); [nonactive]
@var $arr = GetSelectedPaths();
SaveArray("C:\Temp\work.txt", $arr, 1, 0);
MC.Run CMD="C:\Users\erik\Documents\readonly.cmd" ARG="C:\Temp\Work.txt"

the readonly.cmd file reads like this

Code: newbielink:javascript:void(0); [nonactive]
Echo off
for /F "tokens=1* delims=, usebackq" %%x in (%1) do attrib +r "%%x"
Del "%1"


Yes Finally fixed it

Code: newbielink:javascript:void(0); [nonactive]
@var $arr = GetSelectedPaths();
if (arrayCount($arr) > 0
   {
   @var $n = 0;
   for( $n = 0; $n < arrayCount($arr); $n = $n + 1 )
      {
      @var $msg = $arr[$n];
      MC.Run CMD="attrib.exe" ARG="+r {$msg}"
      }
   }
« Last Edit: January 15, 2013, 16:45:08 by erik »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: Getting file list
« Reply #1 on: January 15, 2013, 17:19:08 »
I guess a script command for changing the file attribute would make it even easier. Then no external command would be needed to be executed.
I will see if I can add that.