Discuss Chk for 'file' in the Programming forum on Dev Hardware. Chk for 'file' Programming forum discussing administration and coding scripts in languages including PHP, C++, C, Perl, Java, Visual Basic, XML, HTML, CGI, ActionScript, CSS, JavaScript, Fortran, BASH, and issues related to databases and even batch files.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Open source technologies have proven to be extremely advantageous to businesses.
This adaptive and highly efficient kind of software is central to the infrastructure of most companies. Since the world of open source technology is constantly changing,
IT professionals need a resource to give them up-to-the-minute information about these enterprise level and open source technologies. Dev Shed is that resource .
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today. .
"In front of a monitor is a dangerous place from which to view the world." --Terri Wells
Enable BSOD: Control Panel/Systems, Advanced Tab, hit the Settings button under Startup and Recovery, and under the System Failure area, uncheck the Automatically Restart checkbox.
Location: Centrally located in the middle of nowhere, CA
Posts: 9,222
Time spent in forums: 10 Months 3 Weeks 2 Days 3 h 37 m 41 sec
Reputation Power: 17246
Well, are teh files of a particular extension, ie .txt?
For that matter, you could search the name of the file/directory and see if there is a . since in Windows conventions directories generally don't have suffixes.
Posts: 9
Time spent in forums: 1 h 52 m 37 sec
Reputation Power: 0
i also tried
IF ERRORLEVEL 1
THEN ......
---
IF %ERRORLEVEL% = 1
THEN...
---
basically i just want to move files from one folder to another if an *.xml file has been placed there by accident. i can do it manually, but was thinking that a batch file would be better.
Posts: 4,112
Time spent in forums: 1 Month 1 Week 6 Days 17 h 51 m 19 sec
Reputation Power: 7080
Here's some things to play with, this runs on my computer:
Code:
@ECHO OFF
dir "C:\"
IF %ERRORLEVEL% NEQ 0 SET ERRORLEV=%ERRORLEVEL%
IF ERRORLEVEL 0 SET ERRORLEV=0
ECHO ERRORLEVEL = %ERRORLEV%
A couple notes on syntax.
As far as I can tell, in batch there is no if/then/else structure. IF <test> DO <commands> is how it flows, you'd have to write two IF statements to cover two mutually exclusive options, as I did above.
Second, 'end' will throw an error. You want to use 'EXIT' and there are some options you can use with that. By default EXIT ends the batch script and ends cmd.exe. You should be able to get it to just end the batch and leave cmd.exe running, and to set exit codes.
Third, and this is due to my own inexperience with batch - I'm not sure that MOVE is a valid command.
Posts: 3,936
Time spent in forums: 3 Months 3 Weeks 4 Days 23 h 23 m 18 sec
Reputation Power: 9876
Quote:
Originally Posted by Dngrsone
Well, are teh files of a particular extension, ie .txt?
For that matter, you could search the name of the file/directory and see if there is a . since in Windows conventions directories generally don't have suffixes.
LOADING INFUSIONSOFTLOADING INFUSIONSOFT 1debug:overlay status: OFF overlay not displayed
overlay cookie defined: TI_CAMPAIGN_1012_D
OVERLAY COOKIE set:
status off