Writing text file / check if a file exists on a drive

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
ng80092a
User
Posts: 21
Joined: Thu May 13, 2021 11:50 am

Writing text file / check if a file exists on a drive

Post by ng80092a »

Dear,

I've been trying to write a string of text file, in case a file doesn't exist in the drive.

I know there is the possibility to export a xml file that includes all the content of the current document, but is it possible to do that with a string into a text file?

Kind regards,
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Writing text file / check if a file exists on a drive

Post by Sasha - Tracker Dev Team »

Hello ng80092a,

I'm not quite sure what do you want to achieve. Can you please provide a better description?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
ng80092a
User
Posts: 21
Joined: Thu May 13, 2021 11:50 am

Re: Writing text file / check if a file exists on a drive

Post by ng80092a »

I need to load information from a file into a text value, that depends on the current user. A secondary identity for example.
In case it doesn't exists, the user will be asked once to provide the value, and a text file will be written with that information, and load from there.

Reading information from text files is possible, I've done it already.
So what I'm asking is.. how to write a text file /check if a file exists on a drive.

Does this help understand?
Edit: of course this is in java script :)
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Writing text file / check if a file exists on a drive

Post by Sasha - Tracker Dev Team »

Hello ng80092a,

Are you using the End-User Editor or the Editor SDK?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
ng80092a
User
Posts: 21
Joined: Thu May 13, 2021 11:50 am

Re: Writing text file / check if a file exists on a drive

Post by ng80092a »

The end user
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Writing text file / check if a file exists on a drive

Post by Sasha - Tracker Dev Team »

Hello ng80092a,

Well it's not possible from the End-User JS alone - if you were using the SDK then you can easily implement all of the logic for file checking.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply