So I have to open the file and save as “csv Ms-dos”? Those are huge files. Maybe use R or python to do that?As guessing can't be coding …
Really? That's pretty unusual on a windows box. What happens if you run this bit of code?I do not have an access via cmd.
Sub ShellToCMD()
'Open command window
Shell "cmd.exe", vbNormalFocus
End Sub
Really? That's pretty unusual on a windows box. What happens if you run this bit of code?
VBA Code:Sub ShellToCMD() 'Open command window Shell "cmd.exe", vbNormalFocus End Sub[/CODE [/QUOTE]
Then it pops up the cmd window but not the onedrive cloud directory where are my csv filesReally? That's pretty unusual on a windows box. What happens if you run this bit of code?
VBA Code:Sub ShellToCMD() 'Open command window Shell "cmd.exe", vbNormalFocus End Sub
That is an easily solvable problem -> Use Windows explorer to Move or Copy the files you want to convert from the OneDrive folder to a temporary folder on your hard drive. Then try the recommendation I made back in post #8.Then it pops up the cmd window but not the onedrive cloud directory where are my csv files
Sub ShellToCMD()
Dim LocalFolderPath As String
'Open a command window
LocalFolderPath = "C:\DOS\FileToConvert\" 'edit. Where the files are.
ChDrive Left(LocalFolderPath, 1)
ChDir LocalFolderPath
VBA.Shell "cmd.exe", vbNormalFocus
End Sub
:: Windows CMD.EXE batch file
:: Process all .CSV files in the directory
@echo off
SETLOCAL EnableDelayedExpansion
del /Q dos*.csv
Date /T > ConversionLog.txt
Time /T >> ConversionLog.txt
SET count=1
for %%x in (*.csv) DO (
echo %%x to DosFile%count%.csv >> ConversionLog.txt
echo %%x to DosFile%count%.csv
type %%x > DosFile%count%.csv
set /A count+=1
)
:: end batch file
The files are too large to move around or open and close. So, I would like to change to the CSV MS-DOS without opening and moving. Is this possible? Thank youThat is an easily solvable problem -> Use Windows explorer to Move or Copy the files you want to convert from the OneDrive folder to a temporary folder on your hard drive. Then try the recommendation I made back in post #8.
VBA Code:Sub ShellToCMD() Dim LocalFolderPath As String 'Open a command window LocalFolderPath = "C:\DOS\FileToConvert\" 'edit. Where the files are. ChDrive Left(LocalFolderPath, 1) ChDir LocalFolderPath VBA.Shell "cmd.exe", vbNormalFocus End Sub
It is not possible to do it without opening the file. You don't necessarily have to open the CSV file with Excel, but you have to open it with something (a text editor, a batch file, vba) to do the conversion.The files are too large to move around or open and close. So, I would like to change to the CSV MS-DOS without opening and moving. Is this possible? Thank you
How can I use a vba code? I can open one of the files and run the vba code, but I don’t know how to write the vba code. Thank youIt is not possible to do it without opening the file. You don't necessarily have to open the CSV file with Excel, but you have to open it with something (a text editor, a batch file, vba) to do the conversion.
If you don't know how to write VBA code, then I do not think that VBA is a viable solution for you unless someone volunteers to create the code for you. I wish you well, but unfortunately I do not have the time to spend on that effort.How can I use a vba code? I can open one of the files and run the vba code, but I don’t know how to write the vba code. Thank you