Computing.Net > Forums > Windows XP > Winows COmmands

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Winows COmmands

Reply to Message Icon

Original Message
Name: Sep
Date: May 20, 2008 at 07:02:25 Pacific
Subject: Winows COmmands
OS: Windows XP
CPU/Ram: Core 2,4
Model/Manufacturer: Core
Comment:

Hello,

I have a problem with a *.bat script which runs on a task sheduler it delete every day htm and png files and move it to a other webspace but the problem is i have a "html" file (script) in there which should not get moved anyone can help maybe ?
like just a row which says this file dont get moved ..


-*.bat file------
@echo off
echo.
echo Attempting to upload savefiles...
c:
cd C:\ss
IF NOT EXIST C:\ss\*.png GOTO :NOSCREENSHOTS
ftp -s:ftpcommands.cfg >> FTPlogfile.txt
goto done
:done
echo.
echo Deleting transferred screenshots and htm files...
del C:\ss\*.htm /Q >> HTMLlog.txt
del C:\ss\*.png /Q >> PNGlog.txt
GOTO :END
:NOSCREENSHOTS
CLS
ECHO.
ECHO There are no savefiles present at this moment.
ECHO.
GOTO :END
:END
CLS
EXIT


-ftpcommands.cfg--------
lcd C:\ss
open ip
user
pw
cd httpdocs/x/
prompt
binary
mput *.png
bye
----
Regards,
Sep


Report Offensive Message For Removal


Response Number 1
Name: IVO
Date: May 20, 2008 at 07:34:13 Pacific
Reply: (edit)

With the command

Attrib +H File_Name

make your html file hidden (issue that just one time). Then the file can be accessed but not deleted or moved by your batch.


Report Offensive Follow Up For Removal

Response Number 2
Name: Sep
Date: May 20, 2008 at 08:14:32 Pacific
Reply: (edit)

Thx for your swift reply
unfortunately i have no shell access just ftp
or should i put the command in the script ?
and where ;) ?

the script name which should be hidden is called screen.html


Report Offensive Follow Up For Removal

Response Number 3
Name: IVO
Date: May 20, 2008 at 08:37:13 Pacific
Reply: (edit)

Put the command in your script just after CD C:\ss so

CD C:\ss
Attrib +H screen.html


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home








Do you own an iPhone?

Yes
No, but soon
No


View Results

Poll Finishes In 7 Days.
Discuss in The Lounge
Poll History




Data Recovery Software