I'm trying hard to get to grips with VBS and getting frustrated. Need to get a good beginners book - any suggestions? (I use VBA a lot & some VB 6). I simply want to be able to move a small text file from one folder in a mapped drive "n:\out" to it's parent "n:|", after typing the file name into an input box. Simple, yes? That bit works fine, but I can't get it to actually move the file. :0(
Any suggestions?
Thanks
Matt
This conversation is currently closed to new comments.
Here is the final code for anyone else who may want it. It's probably not the best but - hey - it works! The main part is a sub cos I want to expand it in the future. This is just the begining.......
'================================================== ' Move EXxxx file for re-export MH 14/07/2003 '==================================================
Move
Sub Move()
dim exFileName, fso
set fso = createobject("scripting.filesystemobject") exFileName = inputbox("File name","Move file")
It moves a 2k text file from a folder to the parent folder, but there are 15,000 of them, and searching isn't hard but is time consuming. This does it in a fraction that time. I do this a lot sometimes, so this is really going to help!
Just out of curiosity, why are you doing this with VBS? Is it just a learning experience? The reason I ask is that this would be incredibly easier to do with either a 2-pane file manager or even the command-line.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Move a file using VBS
I'm trying hard to get to grips with VBS and getting frustrated. Need to get a good beginners book - any suggestions? (I use VBA a lot & some VB 6). I simply want to be able to move a small text file from one folder in a mapped drive "n:\out" to it's parent "n:|", after typing the file name into an input box. Simple, yes? That bit works fine, but I can't get it to actually move the file. :0(
Any suggestions?
Thanks
Matt