473,385 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Desk likely to be a real drawer card

What's the easiest way to rename all the files in a folder with entirely new
names starting with (say) 001?

The file type suffix to be retained as is.

Using VB2005 express edition.

Jan 5 '06 #1
1 927
"DIBS" <ma*@legs.com> schrieb:
What's the easiest way to rename all the files in a folder with entirely
new names starting with (say) 001?

The file type suffix to be retained as is.

Using VB2005 express edition.


Untested:

\\\
Dim FileNames() As String = Directory.GetFiles("C:\Bla")
For i As Integer = 0 To UBound(FileNames)
Rename( _
FileNames(i), _
Path.Combine( _
Path.GetDirectoryName(FileNames(i)), _
i.ToString("0000") & Path.GetExtension(FileNames(i)) _
) _
)
Next i
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Scott A. Keen | last post by:
Hi, I'm getting tasked with writing an ASP application deployed throughout the company's intranet where all the workstations will be running Internet Explorer 6.0. It's a retail business, and...
6
by: PW | last post by:
I have an electronic cash drawer as part of a point-of-sale installation. You're supposed to be able to automatically open the cash drawer with some printer commands (drawer is connected to the...
27
by: Josh | last post by:
I work for a small hotel. They don't want to invest in a good front desk program and the paper system that is being used is not working. It is complete chaos at the moment. I want to make a...
2
by: carl | last post by:
need to send a command from a POS Application in Microsoft Access 2000 to open a cash drawer. If anyone can help, please contact me. I will pay $$ for very specific directions if I have to. ...
2
by: Tor Inge Schulstad | last post by:
Hi I'm developing a POS software using an Epson TM-T88iii printer with a cash drawer connected to the printer. The printer is connected via a usb interface to the pc. Can anyone tell me how I...
5
by: John\\ | last post by:
Okay I have been searching the web for a couple of days now and can not seem to find a solution. I have a USB Epson TM-T88III receipt printer with a Cash Drawer connected to it and I can not...
1
by: danishce | last post by:
Hi, I've been trying to configure the cash drawer connected directly to the CPU of the IBM Surepos PC. The cash drawer IBM P/N is 74F6178, IBM FRU P/N is 93F1901. The cash drawer port is connected to...
4
by: ARC | last post by:
I have a user asking if I could put in a code that will open a register drawer. My understanding is the receipt printer will normally send the code the cash drawer. Is there a vba function that...
3
by: gggram2000 | last post by:
Hi, I need some assistance. I'ved been searching the web for days now and can't find an example that really helps me. I have an EPSON TM-T88IV printer through which I want to open a cash drawer. I...
4
by: piscut3 | last post by:
I'm developing a POS with cash drawer integration.But I can't open cash drawer. I have RS232 cable used to connect cash drawer to PC , dot matrix and cash drawer. This cash drawer has no DLL...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.