Questions tagged [fso]

Object Model component on Windows systems that represents the local file system.

The FileSystemObject (FSO) Object Model is used to access the local file system. Among other things, it provides methods for

  • reading file properties
  • creating and deleting files and folders
  • reading from files

For a complete list, visit the documentation link below.

Questions using the tag are expected to relate to programming

Links:

118 questions
1
vote
2 answers

copy a folder- and all subfolders - without overwriting existing

0 I am trying to create a backup database on a network drive using fso.folder copy. My intention is to move all files and subfolder within the folder, but if a file already exists on the backup drive, skip it, and copy the remainder of the files in…
1
vote
1 answer

Excel VBA copy folder, move all files - but if file exists skip

I am trying to create a backup database on a network drive using fso.folder copy. My intention is to move all files within the folder, but if a file already exists on the backup drive, skip it, and copy the remainder of the files in the folder. I…
1
vote
1 answer

Failure to set FSO = CreateObject with ExceltoWord! Add-in

I'm using the Excel Add-in ExceltoWord to auto-populate a Word Document from an Excel worksheet. I've followed the instructions from the original developer here. I'm using the "I created generic bookmark indicators, in Word" and "I put bookmark…
Seth Kasten
  • 43
  • 1
  • 8
1
vote
0 answers

Writing Data To Text File Writes Chinese

I am attempting to write data from VBA to a text file. My syntax shows no debug or compile errors, but when the method completes and I open the text file it is full of nothing readable. It all appears to be in Chinese. This is my syntax, what is…
1
vote
1 answer

VBA Script fails when trying to save as .XLSX

The following script has been written to open all .xlsm file types within a folder and save them as .xlsx types in a new directory but the script keeps failing when trying to save as .xlsx. The error message returned is a run-time error '1004' All…
Paul
  • 53
  • 1
  • 8
1
vote
1 answer

Delete If Present at Destination, Copy To Destination If Error Move to Next

I have VBScript that I wrote a long while back to identify PDF based on the file name. It then appended data to the file name and moved it to the proper directory. I did it as a Select Case in order for it to loop for many file names. I am now…
SanLuka
  • 125
  • 2
  • 13
1
vote
1 answer

WriteLine end of line character

I want to write rows of data from Excel to an XML file. However, I need to validate the data before I commit to file. I know that WriteLine() has its own end of line but I need to add it in the string. So I want to do something like this: strXML =…
CarloC
  • 155
  • 12
1
vote
2 answers

Using VBScript to examine properties of files within a zip file

I'm trying to use VBScript to examine the contents of several hundred .zip files. Essentially what I want to do is run through each .zip and find all of the files wihtin that zip file. For each one of these files within the zip, I want to record…
user2276280
  • 603
  • 2
  • 10
  • 24
1
vote
1 answer

FSO Not Getting Any Files

I'm trying to have the program to copy the files with certain characters. The files to be copied over should be between the today's date and 100 days before today. My program can run, but nothing show up on the new folder. I did make sure that the…
CT19X
  • 25
  • 1
  • 9
1
vote
1 answer

Reading gibberish filename (FTP/FSO)

Looking at my server, i see filenames, that theur characters have been messed up. Example: ôøùú-ô÷åãé-1.mp3 should should be Hebrew letters. While the files can be read in a browser and FTP, they cannot be read always - for example, in an online…
kneidels
  • 956
  • 6
  • 29
  • 55
1
vote
2 answers

jscript (pragma) FSO ReadAll

I am trying to open a file with read permissions var namestart=fso.OpenTextFile("C:\\name.txt",1); var name2=namestart.ReadAll(); namestart.Close(); But this file is not always filled with something, ReadAll gives an error when the file is empty…
Conceptual
  • 57
  • 2
  • 12
1
vote
1 answer

Uncaught TypeError by using FSO.js

I'm trying to access client side files with FSO.js. At the moment, my code looks like this: