Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Numian

Pages: [1]
1
Thank you very much, Mathias! I seem like you know thing or two about this great piece of software... ;D

So here is my final script:
Code: [Select]
@var $files_path = GetSourceSelectedPaths();
@var $source_path = GetSourcePath();
@var $slash = "\\";
@var $n;
@var $name;
@var $name_array[];
for( $n=0; $n < arrayCount($files_path); $n++ )
{
  $name = PathGetNamePart($files_path[$n], 1);
  arrayAdd($name_array, $name);
  MakeDir($source_path ^ $name_array[$n], "NODIALOG,NEWQUEUE");
  MoveFile($source_path ^ $name_array[$n] + $slash, $files_path[$n], "NODIALOG,NEWQUEUE");
}

It does what I wanted, which is just awesome because I save a lot of time. But are there any improvements worth implement?

Thank you again!

2
Ok, so i finally start to play with it. Unfortunatelly I didn'tget veryb far...

Code: [Select]
@var $files_path = GetSourceSelectedPaths();
@var $source_path = GetSourcePath();
LogDumpArray($files_path);
@var $n;
@var $name;
@var $name_array;
for( $n=0; $n<arrayCount($files_path); $n++ ) {
    $name = PathGetNamePart($files_path[$n], 1);
    arrayAdd($name_array, $name);
    LogDumpArray($name_array);    
}

and error log:
Code: [Select]
2018-02-02 13:00:59.782 ==[ Variable : $files_path ]==
2018-02-02 13:00:59.782 [0] : "C:\Users\BigMike\Desktop\Test\001.txt"
2018-02-02 13:00:59.783 [1] : "C:\Users\BigMike\Desktop\Test\002.txt"
2018-02-02 13:00:59.783 [2] : "C:\Users\BigMike\Desktop\Test\003.txt"
2018-02-02 13:00:59.783 [3] : "C:\Users\BigMike\Desktop\Test\004.txt"
2018-02-02 13:00:59.783 ===========================
2018-02-02 13:00:59.783 Script engine error => No matching function with name "arrayAdd" found.
2018-02-02 13:00:59.783 Script engine error - Line : 9, Error : -1 => Code : "arrayAdd($name_array, $name)"

What's going on? How can I create an array with selected file names then so I can use it in loop i.e. like this?
Code: [Select]
MakeDir($source_path ^ $name[$n], "NODIALOG,NEWQUEUE");
Thank you for any suggestions.

3
Hello,

is there a way to move selected files to newly created folder which will have the same names a seldcted files?

For example, I have a file 000.txt and 111.txt. I would like to create folder 000 and 111 and move those two txt files to appropriate folder.

Thank you.

Pages: [1]