creating files and folder on local drive

  • Автор темы Автор темы scribbles
  • Дата начала Дата начала

scribbles

Новичок
Регистрация
04.11.2011
Сообщения
1
Реакции
0
Баллы
0
Hi

Please can someone provide an example or point me towards a tutorial showing how to create local files and directories using zennoposter?

I want to create these dynamically, using the result of parsed text from a regex expression as the file or folder name. As of yet I have been unsuccessful in my attempts.

Thanks
 
It depends on what you are parsing. If the result of the regex includes any characters that you cannot make a file or folder name with, your file|folder won't be created. If your regex doesn't include illegal file characters, just use the macro file append and use the regex result as the folder name or file name and it will create the folder|file for you.

In other words, if your regex contains characters like /... for a site name for instance, it can't be created. If you are parsing for urls, you will have to use another regex on your results to get rid of the /'s in the url
 
I may just be missing this... but I don't see anywhere to "create a directory".... dynamic files are no problem...

Take the execution of the regex and yes... append something to that new file
c:\results\{regex-execution-result}.txt <--- the file will automajically be built...

How to do this with directories?
 
I do it all the time GComm. You can use the execution result of a branch to create a directory also. Hold on a sec and I'll show you an example....

{-File.AppendString-|-\Results\{-FieldData.FieldData-|-●8●7●0●3●7●9●-|-≡1≡8≡8≡1≡4≡9≡8≡1≡7≡3≡-}\Wordpress.txt-|-{-FieldData.FieldData-|-●8●7●0●3●7●9●-|-≡1≡8≡8≡1≡4≡9≡8≡1≡7≡3≡-}:{-FieldData.FieldData-|-●8●7●0●3●7●9●-|-≡5≡7≡5≡4≡5≡5≡6≡7≡4≡-}-|-true-}

Where {-FieldData.FieldData-|-●8●7●0●3●7●9●-|-≡1≡8≡8≡1≡4≡9≡8≡1≡7≡3≡-} is the result of a branch where I split out the username from the email using a string.split and then I save the result of my Wordpress template to that username directory. When I'm done signing up for the twenty four sites that I'm using these templates on, I go back with another template and pull the info from the folder to sign up for Ping.fm. Here's the macro for doing Delicious because I can just use the username from pulling the email that I'm using for Ping.fm

{-File.GetString-|-\Results\{-FieldData.FieldData-|-●9●5●4●8●8●0●-|-≡1≡0≡6≡6≡2≡6≡1≡8≡6≡5≡-}\Delicious.txt-|-0-|-false-}

See. You don't need to do any create directory macro. The program will create a folder on a branch result. Learn something new everyday, don't you.
 
  • Оценить
Реакции: SeRf*X и nevrog
t299320904_31664_4.gif <<<< "CAAAAAAJOOOONES !!"



+1 CAJONES free Zennoposter upgrades for life !!! Somebody start the thread.... ;)
 
  • Оценить
Реакции: bigcajones
Hi

Please can someone provide an example or point me towards a tutorial showing how to create local files and directories using zennoposter?

I want to create these dynamically, using the result of parsed text from a regex expression as the file or folder name. As of yet I have been unsuccessful in my attempts.

Thanks

I used to create files and directories via JS:
var fso, f1;
fso = new ActiveXObject("Scripting.FileSystemObject");
f1 = fso.CreateTextFile("c:\\testfile.txt", true);

so in ZP you also should wrap it in {-JS.Execute-|--} macro
 
  • Оценить
Реакции: helloworld

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)