Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Files Properties

20 May 2011   #1
Igorek83

Windows 7 Ultimate x86
 
 
Files Properties

Hello..

I need help to create some script that will run once a day on system start-up.
The main goal is to retrieve the creation date and time of all the files in a specific folder and save them to some txt file.
The secondary goal is to send this file via VPN to another machine.
Another secondary goal is to automatically archive the txt file (rar or something) with a password before i send it via the network.

I do have knowledge of JAVA/C# but i was thinking maybe there is a simpler way than to create a program.

Thanks.


My System SpecsSystem Spec
.

20 May 2011   #2
TCG

 
 

Whatever language you decide to go with, this is going to be a very particular script and functionality. I don't foresee you finding a tool/utility to make this any easier for you unfortunately. I think you're just going to have to bite the bullet and start coding this to fit your needs, in whatever language you're most comfortable with.
My System SpecsSystem Spec
22 May 2011   #3
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Quote   Quote: Originally Posted by Igorek83 View Post
Hello..

I need help to create some script that will run once a day on system start-up.
The main goal is to retrieve the creation date and time of all the files in a specific folder and save them to some txt file.
The secondary goal is to send this file via VPN to another machine.
Another secondary goal is to automatically archive the txt file (rar or something) with a password before i send it via the network.

I do have knowledge of JAVA/C# but i was thinking maybe there is a simpler way than to create a program.

Thanks.
Wouldn't this be possible in a simple batch file?

dir /tc /o-d /b >filelist.txt

When you install Winrar you also get rar.exe and unrar.exe. So, as long as rar.exe is in your path you'll be ok. You can do this with

(x86 version)... set path=%path%;c:\program files (x86)\Winrar
(x64 version)... set path=%path%;c:\program files\Winrar

The rar command would be

rar a filelist.rar filelist.txt -pmypass

There are many ways to run a task at start up.. This might help .. Understand and Control Startup Apps with the System Configuration Utility

If the files are in c:\myfiles, and winrar is installed in c:\program files\winrar this might be your cmd file...

@Echo Off
set path=%path%;c:\program files\Winrar
cd \my files
dir /tc /o-d /b >filelist.txt
rar a filelist.rar filelist.txt -pmypass
del filelist.txt

There are also several vpn programs and ways of sending files. Again, you could look at the examples per the website above...

hth
My System SpecsSystem Spec
.


22 May 2011   #4
Igorek83

Windows 7 Ultimate x86
 
 

Tanyam, thank you very much. It is almost what i needed.
What i need is the dates and time, and sort the list by date and time.
This is what i needed: dir /o:d

I wonder if there is a way to show ONLY the date and time.

Maybe i can open the filelist.txt and remove all the characters after the 20th character on every line.
Any ideas how to do this in the bach file?
My System SpecsSystem Spec
22 May 2011   #5
Igorek83

Windows 7 Ultimate x86
 
 

Ok.. After learning the FOR loop in batch, I mannaged to create exactlly what i needed:

Code:
@Echo Off
set path=%path%;c:\program files\WinRAR
cd \files
dir /o:d *.txt >raw.txt
FOR /F "tokens=1,2 skip=4" %%G IN (c:\files\raw.txt) DO ECHO %%G %%H >>dates.txt
rar a dates.rar dates.txt -pmypass
del raw.txt
del dates.txt
My System SpecsSystem Spec
22 May 2011   #6
Igorek83

Windows 7 Ultimate x86
 
 

Ok.. This is the complete bat file. Here I also send the file on a shared folder in the vpn:
Code:
@Echo Off
set path=%path%;c:\program files\WinRAR
cd \files
dir /o:d *.txt >raw.txt
FOR /F "tokens=1,2,3 skip=4" %%G IN (c:\files\raw.txt) DO (
	ECHO %%G %%H %%I >>dates.txt
	)
pushd \\192.168.0.1\path
rar a dates.rar c:\files\dates.txt -pPASSWORD
popd
del raw.txt
del dates.txt
My System SpecsSystem Spec
Reply

 Files Properties




Thread Tools





Similar help and support threads
Thread Forum
Wish to edit detail properties of files in window
I have a large number of files which I am changing the naming convention for in the Title detail and am getting frustrated having to right click for properties and anvigate tabs ebfore being able to change each one. I can see the Title of the files in the Details view of the folder they are in, but...
General Discussion
Some Mp3 files not showing all properties.
Some of my Mp3 files aren't showing up all properties in my Win 7 Ultimate 64 bit. But some of them are. Here's a screenshot of what I actually mean: The explorer should show the missing fields cause these are 100% Ok, playable & non-corrupted Mp3 files, you can see on the screenshot when I...
Music, Pictures & Video
Can't change properties to share files
Hello, I have been unable to share files. Not only between two computers both running Windows 7, which I'm trying to sync some files in (OneNote), but I can't even change the properties. I've tried everything, from going into advances sharing settings in the drive and giving full...
Network & Sharing
Need to adjust a files properties under progrtamfiles(x86) in win7HP
WAY new to win 7... think i made a damn mistake buying Windows HOME Premium :p.. the restrictions didnt seem to matter for my needs.. but the User Control seems way limited. All i want to do is change the properties of a file under C:\Program Files (x86)... ( specifically.. i want to go under...
General Discussion
Windows 7 cant set security properties on files from an old XP HDD
Heres the background. 1. XP Pro pc dies (Yayyyyy!!!!!!) 2. Removed HDD to export data to a HDD on a Win7-32bit (HDD is a hitachi deskstar HDT722516DLA380) 3.Connected HDD to the laptop via a USB kit i bought 4.Everything seems fine 5.Attempt to move files -Access Denied- Heres my problem...
General Discussion
Modifying properties of several files/folders at once ?
Hi, I'm having a hard time changing properties of several files/folders at once because Windows doesn't make the modifications I'm applying. For example I select let's say 5 folders full of MP3s - Right click / Properties / Customize tab - In "Use this folder type as a template", Music is...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:18.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App