You have to login in order to post a reply to this topic.

5 replies [Last post]
winjaw
User offline. Last seen 5 hours 54 min ago. Offline
Joined: 04/28/2010
Posts: 11

Hi,

I’m quite new to WinAuto and I enjoy using it almost every day now. I really want to learn the software and I’m improving with small steps, one bit at a time.

However, I haven’t found a good way to save a text (.txt) file to a specific folder. Can any of you guys please help me with a solution?

1. I have opened a new text file (Untitled - Notepad)
2. I add text to the file above using a macro recording
3. I want to save the file above to a specific folder giving it the name %SomeVarible%

Can any of you show me an example on how this can be done?

Thanks for you help.
 

hjaeger
hjaeger's picture
User offline. Last seen 15 hours 7 min ago. Offline
Joined: 07/01/2010
Posts: 31
Re: How to Save File to Folder

Hi winjaw,

I'm a newbie myself, but I decided to have a go at your problem - see attached job

I'm having problems with the Send Keys function, which is why I have broken it down into several steps - so the job probably has more steps than necessary

Cheers,

Henrik

AttachmentSize
Save to selected folder.waj 31 KB
D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: How to Save File to Folder

First of all, hjaeger I have tried to import your job and I could not do it. Which version of WinAutomation did you use to make it?

Regarding the problem on how to save a file to a folder:

To start of, let me just say that is not the ideal way of creating text files. You can narrow down the 3 steps that you described in a very small and straightforward step: "Write Text to File". This action allows you to write text to file in the background without opening notepad. You can enter the variable that contains the folder path in the "File Path:" field of the specific action. In general, when you are dealing with text files in WinAutomation, you might want to explore all your options before opting for the Macro Recorder solution.

Assuming that you still want to use the solution that you mentioned, I have attached a commented job.

AttachmentSize
Sample Job - Save File in Folder.waj 16 KB
__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

winjaw
User offline. Last seen 5 hours 54 min ago. Offline
Joined: 04/28/2010
Posts: 11
Re: How to Save File to Folder

Thanks hjaeger and D.M.Altizer for the time helping me out.

hjaeger, I couldn't open you file either.

D.M.Altizer, I got it working thanks to your attached job. Now I won't have any problems doing it again in the future.

I will also make sure to learn the "Write Text to File" action so I can use that, when appropriate.

Thanks again for your time and help.

hjaeger
hjaeger's picture
User offline. Last seen 15 hours 7 min ago. Offline
Joined: 07/01/2010
Posts: 31
Re: How to Save File to Folder

Well, I am using the 3.1.0.519 beta release - maybe that is the issue?

Cheers,

Henrik

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: How to Save File to Folder

 yep, this is it. Even though you can import jobs from older versions, there is no forward compatibility. This practically means that if someone has 3.0 version installed, he cannot see jobs that were created in 3.1.

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==