Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7008453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:44:12+00:00 2026-05-27T21:44:12+00:00

I want to convert all files to dos to unix format from a folder

  • 0

I want to convert all files to dos to unix format from a folder using VBA excel.

i can find all the files from drive by using following code.

Sub list_all_files(myFilepath As String, filecounter() As Variant, counter1 As Integer)
    With Application.FileSearch
    .NewSearch
    .LookIn = myFilepath
    .filename = "*.*"
    counter = 0
        If .Execute(SortBy:=msoSortByLastModified, SortOrder:=msoSortOrderDescending) > 0 Then
        counter1 = .FoundFiles.Count
            For i1 = 1 To .FoundFiles.Count
                counter = counter + 1
                filecounter(counter) = .FoundFiles(i1)
            Next i1
        End If
    End With
End Sub

But How to convert arrayof(files). I want to save the files on the same path.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:44:13+00:00Added an answer on May 27, 2026 at 9:44 pm

    You would have to open each file in turn and run a find-and-replace operation on the input: vbCrLf (DOS) goes to vbLf (Unix). You’d then have to write that updated file back out to another file… Alternatively, rather than doing this sequentially, you could scan through each file, writing it back to another at the same time but ignoring all the carriage returns.

    A quick Google found example code (e.g., here) to do the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We at the company want to convert all the sites we are hosting from
I have a folder containing over 200 raw images, i want to convert all
I have got ASCII files and want to convert them into maybe excel or
I am trying to batch convert few files in a folder using ffmpeg2theora. for
I want to convert all texts in a string into html entities but preserving
I want to convert all of my db stored procedures to linq to sql
I want to convert all numbers with 6 digits to the word million. like
I have a page which lists all the files in a particular folder (all
Aloha I received a few nice xsd files which I want to convert to
I want to convert my sql data to csv files while clicking on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.