Questions tagged [createfile]

The Windows CreateFile API function

The Windows CreateFile API function.

Use this tag only in conjunction with the windows-specific API. Do not use this tag if you intend to refer to the generic concept of referring to a file.

474 questions
1
vote
0 answers

error when calling a script in powershell created using CreateFile ()

there is an error when creating .ps1 and calling the script in powershell, it gives an error const TCHAR VpnConnectionName[] = (L"C:\\Users\\illia\\\Desktop\\temp.ps1"); const TCHAR BufferStn[] = L"cd\\"; DWORD BYTES = NULL; HANDLE hFile =…
0xFC
  • 11
  • 1
1
vote
2 answers

Flutter create a file and write its contents

I am working on an app which gathers text content from server and as the next step I am trying to save them into separate files to be saved with in apps storage. Storage is a folder called 'storage'. Inside storage, there is a 'fileList.txt' file…
dramaticlook
  • 653
  • 1
  • 12
  • 39
1
vote
2 answers

Automatically create a CSV file with Javascript data on Github

I'm working on a Quizz with Html/JS on Github and which will be dedicated to my comrades. I would like to be able to read everyone’s answers so I thought about creating a text or csv file with their answers that would be saved in a specific…
lewis32
  • 35
  • 1
  • 6
1
vote
1 answer

Create Excel with a C# program

I created a program in C # to create an Excel file containing the data of a database. As you can see in my code, I indicated the title that I wanted to have and I also specified the destination path for the Excel file that I want to create. Except…
user13774090
1
vote
2 answers

How can I remove all the spaces in the cells of excelsheet using nodejs code

I have an excel sheet with lots of spaces in between the content in each cell. I would like to keep that cell unaffected, so I would like to create a copy of the same and remove all the spaces of cell content. Is it possible to do from a nodejs…
learnNcode
  • 149
  • 2
  • 4
  • 16
1
vote
1 answer

How to use regex with ansible file module

I have the below file module that touches a file on remote hosts. - name: create file file: path: "/oracle/{{ inventory_hostname }}/del.tmp" state: touch register: direxists - fail: msg: "Directory missing" when:…
Ashar
  • 2,942
  • 10
  • 58
  • 122
1
vote
3 answers

Writing from System.out.println to a file

I've replaced many strings and outputted the result and now am trying to write those lines into a text file. Here's what I did. I created a new file: File newfile = new File("/Users/Bill/Desktop/newfile.txt"); if (newfile.exists()) { …
lrvilnius
  • 107
  • 1
  • 3
  • 8
1
vote
1 answer

Hook CreateFileW

I want to know what are the files opened/access by a process. May i know how to do that? I tried to use Deviare, a free hooking api to help me, but was unable to find any useful information from their AIP lib or forum. I only know i have to hook on…
Perwyl Liu
  • 349
  • 4
  • 14
1
vote
1 answer

CreateTextFile with a Colon in the path , no error is returned. Why?

This is what I tried (C:\temp really exists): $fso = New-Object -ComObject Scripting.FileSystemObject $ts = $fso.CreateTextFile("c:\temp:AAAAA.txt") $ts.Close() No error returned. The file is created somewhere (but not in c:\temp... if I…
1
vote
1 answer

Can I create a .xls file programmatically in iOS?

I need to create a .xls file from the Array data programmatically in iPhone. How can this be done?
noman
  • 41
  • 7
1
vote
1 answer

Create and then edit file in Ansible problems (authorized_keys)

I'm doing two easy tasks with ansible. First i create a new file with content (i exect how role): - name: Add keys to authorized_keys blockinfile: owner: user group: user mode: '0600' create: yes path:…
Alex
  • 17
  • 4
1
vote
0 answers

Ways to synchronize write access to a file on a network share

I'm writing a program using C++ under Windows that needs to synchronize write access to a file via a local network. I was thinking to use the following approach: //Create or open it using 0 for sharing mode HANDLE hFile =…
ahmd0
  • 16,633
  • 33
  • 137
  • 233
1
vote
2 answers

creating multiple user named and numbered files without loop from bash

Totally new in bash programming and got a problem like this: N empty files should be created. The file sum N and also the file name should be given from users via command line. no loop and getopts should be used. I've tried something like this…
cchi
  • 71
  • 6
1
vote
1 answer

Create new line in text file X times

I want to write a string to file, n number of times (n being the length of the string). With each insertion being on a new line. For example, the string "antallabel" (with a length of 10), should be inserted into a file 10 times, with each insertion…
1
vote
2 answers

Azure and File.CreateText: FileNotFoundException: Could not find file

I have a simple .Net Core MVC web application that I deploy to Azure. In the application, I am creating a little text file called "test.txt" using File.CreateText(). This works fine on my local PC, but when I deploy it to Azure, I get a strange…
user3163495
  • 2,425
  • 2
  • 26
  • 43