Creating a new file?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Реакции
26
Баллы
28
Just like creating a new directory, can we create a new file? I need to create a new file with my variable name, and also to overwrite an existing one.

Is this doable?
 
Yes, this action does. If no file is found it will create it.
6d75a10350ba6963b295aaa68309f0da.png
 
  • Спасибо
Реакции: shabbysquire
Thanks Tobbe. Creates and overwrites any existing files, like you mentioned.

I'd rather use list processing with a variable, like:

{-Project.Directory-}{-Variable.file_name-}.txt

It sometimes works in PM or ZP about 50% the time (usual result is: .txt).
 
Последнее редактирование:
Just like creating a new directory, can we create a new file? I need to create a new file with my variable name, and also to overwrite an existing one.

Is this doable?

Try this

C#:
Развернуть Свернуть Копировать
string path = project.Variables["filePath"].Value;
System.IO.File.Create(path);
 

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