Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Write info To A Text File

$
0
0
Hi...

I am after a bit of help in writing some info to a .txt file.

I have made a quick example of what I have so far but what I want to do is take some information from a paragraph

C:\Users\Malcs\Desktop\Test\[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_feb_2021_x64_dvd_1b81c45e.svf
Take its file name
[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_feb_2021_x64_dvd_1b81c45e.svf
and save as a .text file named as the file name, above.

I have a button

Code:
PG_Image = Paragraph.GetText("Paragraph1");


bFileParts = String.SplitPath(PG_Image);
bDrive = bFileParts.Drive;
bFolder = bFileParts.Folder;
bFileName = bFileParts.Filename;
bFileExtension = bFileParts.Extension;
bFullFileName = bFileName..bFileExtension;
bCurrentFolder = bDrive..bFolder


--TextFile.WriteFromString(bCurrentFolder .. "\\Image_Name.txt", bFileName, false);

TextFile.WriteFromString(bCurrentFolder .. bFileName, bFileName, false);


--File.Open(bCurrentFolder .. "\\Image_Name.txt", "", SW_SHOWNORMAL);
As it stands the a file is created but not as a .txt and if I put
bFileName.txt
I get errors.

I dont know how to write the script so I end up with

[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_feb_2021_x64_dvd_1b81c45e.txt
Hoping somebody can help me out here...

Cheers

[ATTACH]n306793[/ATTACH]

Viewing all articles
Browse latest Browse all 2105

Latest Images

Trending Articles



Latest Images