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
1 answer

ActiveX FSO (FileSystemObject) in Windows8 | Internet Explorer 10

Does anyone knows if the activex filesystemobject is blocked or doesn't work in the new windows8/ie10? Sample code: (javascript) fso = new ActiveXObject("Scripting.FileSystemObject"); //error d =…
havr
  • 51
  • 10
1
vote
1 answer

alternative to encode file to ascii

i trying to find alternative method to encode UTF-8 to ASCII. Below method works but it takes 1 minutes and 40 second to encode this 486kb file to ASCII For Each foundFile As String In My.Computer.FileSystem.ReadAllText(My.Settings.TempFile) …
Momento
  • 25
  • 1
  • 8
1
vote
1 answer

FSO OpenTextFile with french characters

Using ASP's file system object (FSO), I'm trying to read a txt file with OpenTextFile that contains French characters (e and a with accents for e.g). Those characters come out wrong. I tried specifying the format to TristateTrue to open the file as…
greener
  • 4,989
  • 13
  • 52
  • 93
1
vote
1 answer

Pass a username/password when accessing a folder via VBScript

I have a script that is meant to retrieve some files from a users old profile on a server and copy it to there new one, but the users do not have access rights for the folders/files in question when connecting through the server. Is there a way…
David Gard
  • 11,225
  • 36
  • 115
  • 227
1
vote
2 answers

How do you multiply blank spaces in javascript for use in ActiveX FSO Write() method

For instance: var a = " "; var b = ""; b = a * 8; alert(b +"this far to the right"); Note: I don't want to use   since ActiveX FSO will be used to write to a text file not html file. So it needs to be spaces only: More thorough detail of what…
Quaking-Mess
  • 505
  • 4
  • 12
  • 23
1
vote
3 answers

Copying text from one file to another using Javascript

I wrote a script (.js) which should copy all text from one file to another, but it doesn't work (i run it on hard disc): var fso = new ActiveXObject("Scripting.FileSystemObject"); var myInputTextStream = fso.OpenTextFile("C:\\FILE\\back_log.log", 1,…
May12
  • 2,420
  • 12
  • 63
  • 99
0
votes
1 answer

Absolute link to relative link with VBA Access

I'm trying to link my reports but unfortunately it doesn't work I need the relative path and not the absolute path so that the user can access the reports. the problem I manage to write the link in .\ but the program should always update something…
0
votes
1 answer

VBA - save & rename powerpoint and move old one to a new folder. using fso.movefile, but the files aren't moving

Trying to write a code where I loop through a subfolder, update and rename a powerpoint with a new name, and then move the old one to an Archive folder. The first 2 parts work, but the last part does not. I end up with both the old file and the new…
xiaomao
  • 5
  • 2
0
votes
1 answer

combining excel and word VBA scripts. fso.CreateTextFile. Covert Word to text file

I have the following part of a script that converts a Word document (Previously converted from a PDF) to a text file. This is usually a function as part of a larger script but for the purposes of this question this is fine. Sub GetTextFromWord() …
Nick
  • 789
  • 5
  • 22
0
votes
0 answers

wb.SaveAs() and wb.Close() close all open workbooks instead of just the dimensioned worbook objects of choice for VBA

I'm trying to run a script with VBA to loop through a bunch of excel workbooks and add a chart to each. The looping through workbooks, editing, saving, and closing is something I've done a million times. However, this time, everytime I run the…
0
votes
0 answers

fso.deletefolder DeletePathPath not found

I use this statement in a Loop to delete a bunch of folders at a time. fso.deletefolder DeletePath, True Prior to the above statement I do this to make sure it actually exist. If fso.FolderExists(DeletePath) = False Then However, occassionaly get a…
face
  • 11
  • 1
0
votes
1 answer

MOVE FILE IN VBA

I want the code below to use 2 methods. the first method is copy file and the second method is move file. For method 1 I did a comment so that to do method 2 but it didn't work there was an error. Sub movecopyFiles() Dim sh As Worksheet, lastR As…
roy
  • 693
  • 2
  • 11
0
votes
1 answer

Why can I not copy a 4GB file to a brand new 32GB USB 3.0 Flash Drive?

I was given a new 32GB USB 3.0 Flash Drive for Christmas. I have just downloaded a 4k version of a movie that is 4.53GB and I am trying to copy that file to the USB stick however whenever I try my laptop shows me a message saying the file is too…
MonkeyMagix
  • 677
  • 2
  • 10
  • 30
0
votes
2 answers

Moving files to a folder, Error 13 Type mismatch

I want to move files to created folders. I got a mismatch error every time. The aim is to create a folder named after the file prefix if it doesn't exist and copy the file to that folder. I get mismatch error Sub loopf() Dim AcceptedPrefixes…
Gokuba
  • 13
  • 5
0
votes
2 answers

How to map a list of array with selective index?

I have a list of Array with filenames and filepath. Is group into a list of array. Example : **var files = [filenameA, filenameB, filenameC, filepathA, filepathB, filepathC]** I need to map them and convert them to --> var remapfiles =…
MavDev
  • 3
  • 1